1
0
mirror of https://github.com/danog/php-libtgvoip.git synced 2024-11-26 11:54:44 +01:00

Support TCP by default

This commit is contained in:
Daniil Gentili 2018-03-27 14:01:55 +02:00
parent 00a0e15bc9
commit 36296c9ccc
4 changed files with 4 additions and 6 deletions

3
.gitmodules vendored
View File

@ -1,6 +1,3 @@
[submodule "libtgvoip"]
path = libtgvoip
url = https://github.com/danog/libtgvoip
[submodule "backward-cpp"]
path = backward-cpp
url = https://github.com/bombela/backward-cpp

@ -1 +0,0 @@
Subproject commit 857bc8fc311e6e990539be691be8c8a6f98b1be5

@ -1 +1 @@
Subproject commit ff2ccbd985fc9e42ab224ca40221f047f8c2be43
Subproject commit b09ce7f5e418b1a09a22e3dc290e5f8218b1a7fe

View File

@ -273,7 +273,8 @@ void VoIP::parseConfig() {
memset(cfg.statsDumpFilePath, 0, sizeof(cfg.statsDumpFilePath));
}
Php::Value shared_config = self["configuration"]["shared_config"];
ServerConfig::GetSharedInstance()->Update(shared_config);
std::map<std::string, std::string> copyconfig(shared_config);
ServerConfig::GetSharedInstance()->Update(copyconfig);
inst->SetConfig(&cfg);
char *key = (char *) malloc(256);
@ -304,6 +305,7 @@ void VoIP::parseConfig() {
}
eps.push_back(Endpoint(endpoints[i]["id"], (int32_t)endpoints[i]["port"], v4addr, v6addr, EP_TYPE_UDP_RELAY, pTag));
eps.push_back(Endpoint(endpoints[i]["id"], (int32_t)endpoints[i]["port"], v4addr, v6addr, EP_TYPE_TCP_RELAY, pTag));
free(pTag);
}