]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
set the span when sending a start request and sigmod is available
authorMoises Silva <moy@sangoma.com>
Wed, 25 Nov 2009 18:50:04 +0000 (18:50 +0000)
committerMoises Silva <moy@sangoma.com>
Wed, 25 Nov 2009 18:50:04 +0000 (18:50 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@903 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c
libs/freetdm/src/ozmod/ozmod_sangoma_boost/sangoma_boost_client.c

index 2ab181b26896a918a6dd4e0450dbade464570216..351e2b65c2c4e1a5507377364535c7a6cad9ff27 100644 (file)
@@ -326,6 +326,9 @@ static ZIO_CHANNEL_REQUEST_FUNCTION(sangoma_boost_channel_request)
     
        event.calling_number_screening_ind = caller_data->screen;
        event.calling_number_presentation = caller_data->pres;
+       if (sangoma_boost_data->sigmod) {
+               event.span = span->channels[1]->physical_span_id;
+       }
 
        OUTBOUND_REQUESTS[r].status = BST_WAITING;
        OUTBOUND_REQUESTS[r].span = span;
index 2030500ffca64fb515fc2253a379af3c8fe4746b..43b159ff75f56f568f4ab3d6d0864c6275736220 100644 (file)
@@ -368,9 +368,11 @@ sangomabc_event_t *__sangomabc_connection_readp(sangomabc_connection_t *mcon, in
 
        if (mcon->sigmod) {
                e = zap_queue_dequeue(mcon->boost_queue);
-               bytes = e->size;
-               memcpy(&mcon->event, e->boostmsg, bytes);
-               zap_safe_free(e);
+               if (e) {
+                       bytes = e->size;
+                       memcpy(&mcon->event, e->boostmsg, bytes);
+                       zap_safe_free(e);
+               }
        } else {
                bytes = recvfrom(mcon->socket, &mcon->event, sizeof(mcon->event), MSG_DONTWAIT, (struct sockaddr *) &mcon->local_addr, &fromlen);
        }