Changeset 2380 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- Dec 17, 2008 2:28:18 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r2371 r2380 910 910 } 911 911 912 /* Create and attach pjsua_var data to the dialog: */913 call->inv = inv;914 915 dlg->mod_data[pjsua_var.mod.id] = call;916 inv->mod_data[pjsua_var.mod.id] = call;917 918 912 /* If account is locked to specific transport, then lock dialog 919 913 * to this transport too. … … 926 920 } 927 921 928 /* Must answer with some response to initial INVITE. 922 /* Must answer with some response to initial INVITE. We'll do this before 923 * attaching the call to the invite session/dialog, so that the application 924 * will not get notification about this event (on another scenario, it is 925 * also possible that inv_send_msg() fails and causes the invite session to 926 * be disconnected. If we have the call attached at this time, this will 927 * cause the disconnection callback to be called before on_incoming_call() 928 * callback is called, which is not right). 929 929 */ 930 930 status = pjsip_inv_initial_answer(inv, rdata, … … 944 944 if (status != PJ_SUCCESS) { 945 945 pjsua_perror(THIS_FILE, "Unable to send 100 response", status); 946 } 947 } 946 PJSUA_UNLOCK(); 947 return PJ_TRUE; 948 } 949 } 950 951 /* Create and attach pjsua_var data to the dialog: */ 952 call->inv = inv; 953 954 dlg->mod_data[pjsua_var.mod.id] = call; 955 inv->mod_data[pjsua_var.mod.id] = call; 948 956 949 957 ++pjsua_var.call_cnt; … … 3726 3734 pjsip_event *e) 3727 3735 { 3728 pjsua_call *call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id];3736 pjsua_call *call; 3729 3737 3730 3738 PJSUA_LOCK(); 3739 3740 call = (pjsua_call*) inv->dlg->mod_data[pjsua_var.mod.id]; 3741 3742 if (call == NULL) { 3743 PJSUA_UNLOCK(); 3744 return; 3745 } 3731 3746 3732 3747 /* Notify application callback first */
Note: See TracChangeset
for help on using the changeset viewer.