mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 20:48:07 +00:00
Fix one more possible crash in TunnelManager if the ip address is NULL.
This commit is contained in:
parent
1687ceb442
commit
264a6ac3aa
2 changed files with 7 additions and 3 deletions
|
|
@ -102,6 +102,10 @@ int TunnelManager::eXosipSelect(int max_fds, fd_set *s1, fd_set *s2, fd_set *s3,
|
|||
|
||||
|
||||
void TunnelManager::addServer(const char *ip, int port,unsigned int udpMirrorPort,unsigned int delay) {
|
||||
if (ip == NULL) {
|
||||
ip = "";
|
||||
ms_warning("Adding tunnel server with empty ip, it will not work!");
|
||||
}
|
||||
addServer(ip,port);
|
||||
mUdpMirrorClients.push_back(UdpMirrorClient(ServerAddr(ip,udpMirrorPort),delay));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
|
||||
#include <wininet.h>
|
||||
|
||||
static int linphone_gtk_get_new_version(const char *version_url, char *version, size_t size){
|
||||
static int linphone_gtk_create_version(const char *version_url, char *version, size_t size){
|
||||
DWORD dwDownloaded = 0;
|
||||
HINTERNET hSession = NULL, hConnect = NULL;
|
||||
int ret=-1;
|
||||
|
|
@ -55,7 +55,7 @@ static int linphone_gtk_get_new_version(const char *version_url, char *version,
|
|||
|
||||
#else
|
||||
|
||||
static int linphone_gtk_get_new_version(const char *url, char *version, size_t size){
|
||||
static int linphone_gtk_create_version(const char *url, char *version, size_t size){
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -121,7 +121,7 @@ static int version_compare(const char *v1, const char *v2){
|
|||
static void *check_for_new_version(void *d){
|
||||
const char *version_url=(const char *)d;
|
||||
char version[256];
|
||||
if (linphone_gtk_get_new_version(version_url,version,sizeof(version))==0){
|
||||
if (linphone_gtk_create_version(version_url,version,sizeof(version))==0){
|
||||
if (version_compare(version,LINPHONE_VERSION)>0){
|
||||
const char *download_site=linphone_gtk_get_ui_config("download_site",NULL);
|
||||
if (download_site) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue