]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
freetdm: do not expect result_cb to be set to make the interface cleaner
authorMoises Silva <moy@sangoma.com>
Mon, 7 Feb 2011 22:06:45 +0000 (16:06 -0600)
committerMoises Silva <moy@sangoma.com>
Mon, 7 Feb 2011 22:06:45 +0000 (16:06 -0600)
libs/freetdm/src/ftdm_io.c

index 0f92f59053668cf9c8de2fbec4a855e948f27f33..c9000de1f2282d14c2b6da0697973346dcca3353 100644 (file)
@@ -37,9 +37,6 @@
  *
  */
 
-#ifdef MOYTEST
-crap
-#endif
 #define _GNU_SOURCE
 #include "private/ftdm_core.h"
 #include <stdarg.h>
@@ -2509,10 +2506,12 @@ FT_DECLARE(ftdm_status_t) _ftdm_call_place(const char *file, const char *func, i
        }
 
        /* we have a locked channel and are not afraid of using it! */
-       status = hunting->result_cb(fchan, caller_data);
-       if (status != FTDM_SUCCESS) {
-               status = FTDM_ECANCELED;
-               goto done;
+       if (hunting->result_cb) {
+               status = hunting->result_cb(fchan, caller_data);
+               if (status != FTDM_SUCCESS) {
+                       status = FTDM_ECANCELED;
+                       goto done;
+               }
        }
 
        ftdm_channel_set_caller_data(fchan, caller_data);