From: Moises Silva Date: Mon, 7 Feb 2011 22:06:45 +0000 (-0600) Subject: freetdm: do not expect result_cb to be set to make the interface cleaner X-Git-Tag: v1.2-rc1~172^2~24^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3830484155cfa3bd8ef09b88515e8afa6c251121;p=thirdparty%2Ffreeswitch.git freetdm: do not expect result_cb to be set to make the interface cleaner --- diff --git a/libs/freetdm/src/ftdm_io.c b/libs/freetdm/src/ftdm_io.c index 0f92f59053..c9000de1f2 100644 --- a/libs/freetdm/src/ftdm_io.c +++ b/libs/freetdm/src/ftdm_io.c @@ -37,9 +37,6 @@ * */ -#ifdef MOYTEST -crap -#endif #define _GNU_SOURCE #include "private/ftdm_core.h" #include @@ -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);