Support updated libtgvoip

Enable TGVOIP_LOG_VERBOSITY=5 by default
This commit is contained in:
Igor Zhukov 2020-01-28 21:18:46 +04:00
parent c471de22ab
commit fc802fabfe
5 changed files with 9 additions and 5 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -18,13 +18,13 @@ ENDIF()
ExternalProject_Add(
libtgvoip
URL https://github.com/telegramdesktop/libtgvoip/archive/88b47b6.tar.gz
URL https://github.com/telegramdesktop/libtgvoip/archive/c5651ff.tar.gz
#Unstable
#URL https://github.com/telegramdesktop/libtgvoip/archive/f775311.tar.gz
#URL https://github.com/telegramdesktop/libtgvoip/archive/da27199.tar.gz
PREFIX libtgvoip
BUILD_IN_SOURCE 1
#CONFIGURE_COMMAND ./configure CPPFLAGS=-DTGVOIP_LOG_VERBOSITY=5 --enable-audio-callback --without-pulse --without-alsa
CONFIGURE_COMMAND ./configure CPPFLAGS=-DTGVOIP_LOG_VERBOSITY=0 --enable-audio-callback --without-pulse --without-alsa
CONFIGURE_COMMAND ./configure CPPFLAGS=-DTGVOIP_LOG_VERBOSITY=5 --enable-audio-callback --without-pulse --without-alsa
#CONFIGURE_COMMAND ./configure CPPFLAGS=-DTGVOIP_LOG_VERBOSITY=0 --enable-audio-callback --without-pulse --without-alsa
BUILD_COMMAND make
INSTALL_COMMAND ""
)

View File

@ -141,7 +141,11 @@ void init(int argc, char **argv) {
char buf[16];
if (sscanf(argv[1], "%15[0-9.]:%hu", buf, &ep.port) != 2)
throw std::invalid_argument(std::string("Incorrect reflector address: ") + argv[1]);
ep.host = buf;
TgVoipEdpointHost host = {
.ipv4 = std::string(buf),
.ipv6 = std::string(),
};
ep.host = host;
int len;
sscanf(argv[2], "%*32[0-9a-f]%n", &len);