- t_uac doesn't register a callback anymore if received a null function
authorBogdan-Andrei Iancu <bogdan@voice-system.ro>
Thu, 11 Dec 2003 13:59:53 +0000 (13:59 +0000)
committerBogdan-Andrei Iancu <bogdan@voice-system.ro>
Thu, 11 Dec 2003 13:59:53 +0000 (13:59 +0000)
   (thanks to Jamey Hicks)

modules/tm/uac.c

index 783a0c9..542dabd 100644 (file)
@@ -184,7 +184,7 @@ int t_uac(str* method, str* headers, str* body, dlg_t* dialog,
        }
 
        /* add the callback the the transaction for LOCAL_COMPLETED event */
-       if (insert_tmcb( &(new_cell->tmcb_hl), TMCB_LOCAL_COMPLETED, cb, cbp)!=1) {
+       if(cb && insert_tmcb(&(new_cell->tmcb_hl),TMCB_LOCAL_COMPLETED,cb,cbp)!=1){
                ret=E_OUT_OF_MEM;
                LOG(L_ERR, "t_uac: short of tmcb shmem\n");
                goto error2;