Skip to content
Snippets Groups Projects
Commit 702b8445 authored by yanmorin's avatar yanmorin
Browse files

Call/SipCall pointer to enable jerome to compile
parent 1e1ea796
No related branches found
No related tags found
No related merge requests found
...@@ -550,6 +550,8 @@ SipVoIPLink::getEvent (void) ...@@ -550,6 +550,8 @@ SipVoIPLink::getEvent (void)
eXosip_event_t *event; eXosip_event_t *event;
short id; short id;
char *name; char *name;
Call *call = NULL;
SipCall *sipcall = NULL;
event = eXosip_event_wait (0, 50); event = eXosip_event_wait (0, 50);
eXosip_lock(); eXosip_lock();
...@@ -583,7 +585,7 @@ SipVoIPLink::getEvent (void) ...@@ -583,7 +585,7 @@ SipVoIPLink::getEvent (void)
// Generate id // Generate id
id = Manager::instance().generateNewCallId(); id = Manager::instance().generateNewCallId();
Manager::instance().pushBackNewCall(id, Incoming); call = Manager::instance().pushBackNewCall(id, Incoming);
_debug("Incoming Call with id %d [cid = %d, did = %d]\n", _debug("Incoming Call with id %d [cid = %d, did = %d]\n",
id, event->cid, event->did); id, event->cid, event->did);
_debug("Local audio port: %d\n", _localPort); _debug("Local audio port: %d\n", _localPort);
...@@ -592,22 +594,22 @@ SipVoIPLink::getEvent (void) ...@@ -592,22 +594,22 @@ SipVoIPLink::getEvent (void)
osip_from_t *from; osip_from_t *from;
osip_from_init(&from); osip_from_init(&from);
sipcall = getSipCall(id);
if (event->request != NULL) { if (event->request != NULL) {
char *tmp = NULL; char *tmp = NULL;
osip_from_to_str (event->request->from, &tmp); osip_from_to_str (event->request->from, &tmp);
if (tmp != NULL) { if (tmp != NULL) {
snprintf (getSipCall(id)->getRemoteUri(), 256, "%s", tmp); snprintf (sipcall->getRemoteUri(), 256, "%s", tmp);
osip_free (tmp); osip_free (tmp);
} }
} }
osip_from_parse(from, getSipCall(id)->getRemoteUri()); osip_from_parse(from, sipcall->getRemoteUri());
name = osip_from_get_displayname(from); name = osip_from_get_displayname(from);
//Don't need this display text message now that we send the name //Don't need this display text message now that we send the name
//inside the Manager to the gui //inside the Manager to the gui
//Manager::instance().displayTextMessage(id, name); //Manager::instance().displayTextMessage(id, name);
Call *call = Manager::instance().getCall(id);
if ( call != NULL) { if ( call != NULL) {
call->setCallerIdName(name); call->setCallerIdName(name);
osip_uri_t* url = osip_from_get_url(from); osip_uri_t* url = osip_from_get_url(from);
...@@ -622,7 +624,6 @@ SipVoIPLink::getEvent (void) ...@@ -622,7 +624,6 @@ SipVoIPLink::getEvent (void)
_debug("From: %s\n", name); _debug("From: %s\n", name);
osip_from_free(from); osip_from_free(from);
SipCall *sipcall = getSipCall(id);
// Associate an audio port with a call // Associate an audio port with a call
sipcall->setLocalAudioPort(_localPort); sipcall->setLocalAudioPort(_localPort);
sipcall->setLocalIp(getLocalIpAddress()); sipcall->setLocalIp(getLocalIpAddress());
...@@ -648,7 +649,7 @@ SipVoIPLink::getEvent (void) ...@@ -648,7 +649,7 @@ SipVoIPLink::getEvent (void)
if (id == 0) { if (id == 0) {
id = findCallIdInitial(event); id = findCallIdInitial(event);
} }
SipCall *sipcall = getSipCall(id); sipcall = getSipCall(id);
if ( sipcall ) { if ( sipcall ) {
_debug("Call is answered [id = %d, cid = %d, did = %d], localport=%d\n", _debug("Call is answered [id = %d, cid = %d, did = %d], localport=%d\n",
id, event->cid, event->did,sipcall->getLocalAudioPort()); id, event->cid, event->did,sipcall->getLocalAudioPort());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment