瀏覽代碼

- t_uac doesn't register a callback anymore if received a null function
(thanks to Jamey Hicks)

Bogdan-Andrei Iancu 22 年之前
父節點
當前提交
dcc4133d17
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/tm/uac.c

+ 1 - 1
modules/tm/uac.c

@@ -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;