Skip to content

Commit

Permalink
API: For ossrs#2508, query feature docker and packager. v4.0.148
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Aug 7, 2021
1 parent 48ef3dc commit 86e506e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions trunk/auto/auto_headers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ echo "#ifndef SRS_AUTO_HEADER_HPP" >> $SRS_AUTO_HEADERS_H
echo "#define SRS_AUTO_HEADER_HPP" >> $SRS_AUTO_HEADERS_H
echo "" >> $SRS_AUTO_HEADERS_H

echo "#define SRS_PACKAGER \"${SRS_AUTO_PACKAGER}\"" >> $SRS_AUTO_HEADERS_H
echo "#define SRS_BUILD_TS \"`date +%s`\"" >> $SRS_AUTO_HEADERS_H
echo "#define SRS_BUILD_DATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $SRS_AUTO_HEADERS_H
echo "#define SRS_UNAME \"`uname -a`\"" >> $SRS_AUTO_HEADERS_H
Expand Down
10 changes: 10 additions & 0 deletions trunk/src/app/srs_app_latest_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <sstream>
using namespace std;

// Whether we are in docker, defined in main module.
extern bool _srs_in_docker;

void srs_build_features(stringstream& ss)
{
ss << "&docker=" << _srs_in_docker
<< "&packager=" << SRS_PACKAGER;
}

SrsLatestVersion::SrsLatestVersion()
{
trd_ = new SrsSTCoroutine("signal", this);
Expand Down Expand Up @@ -111,6 +120,7 @@ srs_error_t SrsLatestVersion::query_latest_version()
<< "&id=" << server_id_ << "&role=srs"
<< "&eip=" << srs_get_public_internet_address()
<< "&ts=" << srsu2ms(srs_get_system_time());
srs_build_features(ss);
string url = ss.str();

SrsHttpUri uri;
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
#ifndef SRS_CORE_VERSION3_HPP
#define SRS_CORE_VERSION3_HPP

#define SRS_VERSION3_REVISION 165
#define SRS_VERSION3_REVISION 166

#endif
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

#define VERSION_MAJOR 4
#define VERSION_MINOR 0
#define VERSION_REVISION 147
#define VERSION_REVISION 148

#endif

0 comments on commit 86e506e

Please sign in to comment.