mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 11:21:52 +00:00
API: For #2508, query feature docker and packager. v3.0.166
This commit is contained in:
parent
5c6bb63bf2
commit
5c97da28c6
3 changed files with 12 additions and 1 deletions
|
@ -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_AUTO_PACKAGER \"${SRS_AUTO_PACKAGER}\"" >> $SRS_AUTO_HEADERS_H
|
||||
echo "#define SRS_AUTO_BUILD_TS \"`date +%s`\"" >> $SRS_AUTO_HEADERS_H
|
||||
echo "#define SRS_AUTO_BUILD_DATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $SRS_AUTO_HEADERS_H
|
||||
echo "#define SRS_AUTO_UNAME \"`uname -a`\"" >> $SRS_AUTO_HEADERS_H
|
||||
|
|
|
@ -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_AUTO_PACKAGER;
|
||||
}
|
||||
|
||||
SrsLatestVersion::SrsLatestVersion()
|
||||
{
|
||||
trd_ = new SrsSTCoroutine("signal", this);
|
||||
|
@ -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;
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
#ifndef SRS_CORE_VERSION3_HPP
|
||||
#define SRS_CORE_VERSION3_HPP
|
||||
|
||||
#define SRS_VERSION3_REVISION 165
|
||||
#define SRS_VERSION3_REVISION 166
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue