Skip to content
Snippets Groups Projects
Commit 4ef082b0 authored by llea's avatar llea
Browse files

Fix bug if no network.

Change "pixmaps" to "icons" in global.h
parent f9603315
No related branches found
No related tags found
No related merge requests found
Laurielle LEA (13 July 2005) version 0.4
- Fix bug if network is not available.
Laurielle LEA (11 July 2005) version 0.4
- Check functions return.
- Remove unused mute functions
......
......@@ -33,7 +33,7 @@ AC_ARG_PROGRAM
AM_INIT_AUTOMAKE(sflphone, $VERSION)
AM_DISABLE_LIBRARIES
AC_PROG_LIBTOOL
dnl AC_CHECK_COMPILERS
AC_CHECK_COMPILERS
CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS "
......
......@@ -41,7 +41,7 @@ typedef short int16;
#define PROGNAME "sflphone"
#define SKINDIR "skins"
#define PIXDIR "pixmaps"
#define PIXDIR "icons"
#define RINGDIR "rings"
#define CODECDIR "codecs"
......
......@@ -973,9 +973,7 @@ QtGUIMainWindow::qt_outgoingCall (void)
displayStatus(TRYING_STATUS);
_callmanager->getCall(id)->setCallerIdNumber(to);
changeLineStatePixmap(line, BUSY);
} else {
_callmanager->displayErrorText("Outgoing call failed !\n");
}
}
return line;
}
......
......@@ -130,13 +130,17 @@ Manager::init (void)
}
_voIPLinkVector->at(DFT_VOIP_LINK)->init();
if (get_config_fields_int(SIGNALISATION, AUTO_REGISTER) == YES and
_exist == 1) {
if (registerVoIPLink() != 1) {
_debug("Registration failed\n");
displayErrorText("Check your configuration fields");
}
}
if (_voIPLinkVector->at(DFT_VOIP_LINK)->checkNetwork()) {
// If network is available
if (get_config_fields_int(SIGNALISATION, AUTO_REGISTER) == YES and
_exist == 1) {
if (registerVoIPLink() != 1) {
_debug("Registration failed\n");
displayErrorText("Check your configuration fields");
}
}
}
}
void
......
......@@ -72,16 +72,24 @@ SipVoIPLink::~SipVoIPLink (void)
delete _audiortp;
}
bool
SipVoIPLink::checkNetwork (void)
{
// Set IP address
if (getLocalIp() == -1) {
// If no network
return false;
} else {
return true;
}
}
int
SipVoIPLink::init (void)
{
string tmp;
tmp = string(PROGNAME) + "/" + string(VERSION);
// Set IP address
if (getLocalIp() == -1)
return -1;
srand (time(NULL));
if (eXosip_init (NULL, NULL, DEFAULT_SIP_PORT) != 0) {
......
......@@ -67,6 +67,7 @@ public:
virtual ~SipVoIPLink (void);
virtual int init (void);
virtual bool checkNetwork (void);
virtual void initRtpmapCodec (void);
virtual void quit (void);
virtual int setRegister (void);
......
......@@ -39,6 +39,7 @@ public:
virtual int getEvent (void) = 0;
virtual int init (void) = 0;
virtual bool checkNetwork (void) = 0;
virtual void initRtpmapCodec (void) = 0;
virtual void quit (void) = 0;
virtual void newOutgoingCall (short callid) = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment