Ignore:
Timestamp:
Mar 28, 2012 9:05:34 AM (8 years ago)
Author:
bennylp
Message:

Misc (re #1446): prevent on_call_state() callback from being called before on_incoming_call() callback is called

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r3982 r3990  
    12051205    } 
    12061206 
    1207     /* Create and attach pjsua_var data to the dialog: */ 
     1207    /* Create and attach pjsua_var data to the dialog */ 
    12081208    call->inv = inv; 
    1209     dlg->mod_data[pjsua_var.mod.id] = call; 
    1210     inv->mod_data[pjsua_var.mod.id] = call; 
    12111209 
    12121210    /* Store variables required for the callback after the async 
     
    12831281     * callback is called, which is not right). 
    12841282     */ 
    1285     status = pjsip_inv_initial_answer(inv, rdata,  
     1283    status = pjsip_inv_initial_answer(inv, rdata, 
    12861284                                      100, NULL, NULL, &response); 
    12871285    if (status != PJ_SUCCESS) { 
     
    12931291        } else { 
    12941292            pjsip_inv_send_msg(inv, response); 
    1295             pjsip_inv_terminate(inv, response->msg->line.status.code,  
     1293            pjsip_inv_terminate(inv, response->msg->line.status.code, 
    12961294                                PJ_FALSE); 
    12971295        } 
     
    13061304        } 
    13071305    } 
     1306 
     1307    /* Only do this after sending 100/Trying (really! see the long comment 
     1308     * above) 
     1309     */ 
     1310    dlg->mod_data[pjsua_var.mod.id] = call; 
     1311    inv->mod_data[pjsua_var.mod.id] = call; 
    13081312 
    13091313    ++pjsua_var.call_cnt; 
Note: See TracChangeset for help on using the changeset viewer.