From 5abd4c87373988a6db65c9cd7769f3145e5dfa7f Mon Sep 17 00:00:00 2001 From: savoirfairelinux <savoirfairelinux> Date: Sun, 26 Dec 2004 14:48:14 +0000 Subject: [PATCH] more robust in case of non-network --- src/manager.cpp | 5 +++-- src/sip.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/manager.cpp b/src/manager.cpp index 32893d3508..c283f1e829 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -81,8 +81,9 @@ Manager::selectAudioDriver (void) { void Manager::sip_rtp_init (void) { // Init the SIP and RTP stacks. - sip->initSIP (); - sip->initRtpmapCodec (); + if ( sip->initSIP () != -1) { + sip->initRtpmapCodec (); + } if (Config::getb(QString("Preferences/Options.autoregister"))) { // Register to the known proxies if available diff --git a/src/sip.cpp b/src/sip.cpp index de6f0adeec..6890020246 100644 --- a/src/sip.cpp +++ b/src/sip.cpp @@ -96,7 +96,8 @@ SIP::initSIP (void) { tmp = QString(PROGNAME) + "/" + QString(VERSION); // Set IP address - getLocalIp(); + if ( getLocalIp() == -1 ) + return -1; srand (time(NULL)); if (eXosip_init (NULL, NULL, DEFAULT_SIP_PORT) != 0) { -- GitLab