]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix abort in sangoma_boost_client
authorMoises Silva <moy@sangoma.com>
Mon, 18 Jan 2010 17:00:20 +0000 (17:00 +0000)
committerMoises Silva <moy@sangoma.com>
Mon, 18 Jan 2010 17:00:20 +0000 (17:00 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@985 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/freetdm/src/ftmod/ftmod_sangoma_boost/sangoma_boost_client.c

index 1d026f1bf487c26ddc83fb05d24a65c17ec14e24..163e1acd84a7bec42fb83c58059da7bc1cb4f726 100644 (file)
@@ -429,11 +429,8 @@ int __sangomabc_connection_write(sangomabc_connection_t *mcon, sangomabc_event_t
        ftdm_assert_return(mcon->socket >= 0, -1, "No mcon->socket!");
        ftdm_assert_return(mcon->mutex != NULL, -1, "No mcon->mutex!");
 
-       if (event->span >= FTDM_MAX_PHYSICAL_SPANS_PER_LOGICAL_SPAN || event->chan >= FTDM_MAX_CHANNELS_PHYSICAL_SPAN ) {
-               ftdm_log(file, func, line, FTDM_LOG_LEVEL_CRIT, "Critical Error: TX Cmd=%s Invalid Span=%i Chan=%i\n", sangomabc_event_id_name(event->event_id), event->span, event->chan);
-               abort();
-               return -1;
-       }
+       ftdm_assert_return(event->span <= FTDM_MAX_PHYSICAL_SPANS_PER_LOGICAL_SPAN, -1, "Invalid span when writing boost event\n");
+       ftdm_assert_return(event->chan <= FTDM_MAX_CHANNELS_PHYSICAL_SPAN, -1, "Invalid chan when writing boost event\n");
 
        if (!boost_full_event(event->event_id)) {
                event_size=sizeof(sangomabc_short_event_t);