From 6b1a8c364e5073902775355b847691ede84fe4d7 Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandresavard@alexandresavard-desktop.(none)> Date: Wed, 18 Nov 2009 09:33:57 -0500 Subject: [PATCH] [#2444] Add debug to catch occasional crash when loading client's config --- sflphone-common/src/sip/sipvoiplink.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp index d33a0bbf10..68b3f7b1fd 100644 --- a/sflphone-common/src/sip/sipvoiplink.cpp +++ b/sflphone-common/src/sip/sipvoiplink.cpp @@ -479,7 +479,7 @@ int SIPVoIPLink::sendRegister (AccountID id) status = createUDPServer (id); if (status != PJ_SUCCESS) { - _debug ("Use the local UDP transport"); + _debug ("Use the local UDP transport\n"); account->setAccountTransport (_localUDPTransport); } } @@ -612,7 +612,7 @@ int SIPVoIPLink::sendRegister (AccountID id) _mutexSIP.leaveMutex(); account->setRegistrationInfo (regc); - _debug ("ok\n"); + return true; } @@ -2831,7 +2831,10 @@ void regc_cb (struct pjsip_regc_cbparam *param) const pj_str_t * description = pjsip_get_status_text (param->code); - if (param->code) { + if (param->code && description) { + + std::string descriptionprint(description->ptr, description->slen); + _debug("Received client registration callback wiht code: %i, %s\n", param->code, descriptionprint.c_str()); DBusManager::instance().getCallManager()->registrationStateChanged (account->getAccountID(), std::string (description->ptr, description->slen), param->code); std::pair<int, std::string> details (param->code, std::string (description->ptr, description->slen)); account->setRegistrationStateDetailed (details); -- GitLab