Changeset 376 for pjproject/trunk
- Timestamp:
- Apr 4, 2006 11:06:34 AM (19 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_dialog.h
r283 r376 409 409 * @param dlg The dialog. 410 410 * @param tdata The request message to be sent. 411 * @param p_tsx Optional argument to receive the transaction 412 * instance used to send the request. 411 * @param mod_data_id Optional module data index to put an optional data 412 * into the transaction. If no module data is to be 413 * attached, this value should be -1. 414 * @param mod_data Optional module data to be attached to the 415 * transaction at mod_data_id index. 413 416 * 414 417 * @return PJ_SUCCESS on success. … … 416 419 PJ_DECL(pj_status_t) pjsip_dlg_send_request ( pjsip_dialog *dlg, 417 420 pjsip_tx_data *tdata, 418 pjsip_transaction **p_tsx ); 421 int mod_data_id, 422 void *mod_data); 419 423 420 424 -
pjproject/trunk/pjsip/src/pjsip-simple/evsub.c
r315 r376 1149 1149 1150 1150 /* Send the request. */ 1151 status = pjsip_dlg_send_request(sub->dlg, tdata, NULL);1151 status = pjsip_dlg_send_request(sub->dlg, tdata, -1, NULL); 1152 1152 if (status != PJ_SUCCESS) 1153 1153 goto on_return; … … 1483 1483 tsx->last_tx, &tdata); 1484 1484 if (status == PJ_SUCCESS) 1485 status = pjsip_dlg_send_request(sub->dlg, tdata, NULL);1485 status = pjsip_dlg_send_request(sub->dlg, tdata, -1, NULL); 1486 1486 1487 1487 if (status != PJ_SUCCESS) { … … 1870 1870 tsx->last_tx, &tdata); 1871 1871 if (status == PJ_SUCCESS) 1872 status = pjsip_dlg_send_request( sub->dlg, tdata, NULL );1872 status = pjsip_dlg_send_request( sub->dlg, tdata, -1, NULL ); 1873 1873 1874 1874 if (status != PJ_SUCCESS) { -
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r324 r376 177 177 } 178 178 179 status = pjsip_dlg_send_request(inv->dlg, tdata, NULL);179 status = pjsip_dlg_send_request(inv->dlg, tdata, -1, NULL); 180 180 if (status != PJ_SUCCESS) { 181 181 /* Better luck next time */ … … 1581 1581 1582 1582 if (tdata->msg->type == PJSIP_REQUEST_MSG) { 1583 pjsip_transaction *tsx;1584 1583 struct tsx_inv_data *tsx_inv_data; 1585 1584 1586 status = pjsip_dlg_send_request(inv->dlg, tdata, &tsx); 1585 pjsip_dlg_inc_lock(inv->dlg); 1586 1587 tsx_inv_data = pj_pool_zalloc(inv->pool, sizeof(struct tsx_inv_data)); 1588 tsx_inv_data->inv = inv; 1589 1590 pjsip_dlg_dec_lock(inv->dlg); 1591 1592 status = pjsip_dlg_send_request(inv->dlg, tdata, mod_inv.mod.id, 1593 tsx_inv_data); 1587 1594 if (status != PJ_SUCCESS) 1588 1595 return status; 1589 1590 tsx_inv_data = pj_pool_zalloc(tsx->pool, sizeof(struct tsx_inv_data));1591 tsx_inv_data->inv = inv;1592 1593 tsx->mod_data[mod_inv.mod.id] = tsx_inv_data;1594 1596 1595 1597 } else { -
pjproject/trunk/pjsip/src/pjsip/sip_dialog.c
r315 r376 932 932 PJ_DEF(pj_status_t) pjsip_dlg_send_request( pjsip_dialog *dlg, 933 933 pjsip_tx_data *tdata, 934 pjsip_transaction **p_tsx ) 934 int mod_data_id, 935 void *mod_data) 935 936 { 936 937 pjsip_transaction *tsx; … … 979 980 tsx->mod_data[dlg->ua->id] = dlg; 980 981 982 /* Copy optional caller's mod_data, if present */ 983 if (mod_data_id >= 0 && mod_data_id < PJSIP_MAX_MODULE) 984 tsx->mod_data[mod_data_id] = mod_data; 985 981 986 /* Increment transaction counter. */ 982 987 ++dlg->tsx_count; … … 989 994 } 990 995 991 if (p_tsx)992 *p_tsx = tsx;993 994 996 } else { 995 997 status = pjsip_endpt_send_request_stateless(dlg->endpt, tdata, … … 998 1000 goto on_error; 999 1001 1000 if (p_tsx)1001 *p_tsx = NULL;1002 1002 } 1003 1003 … … 1014 1014 pjsip_tx_data_dec_ref( tdata ); 1015 1015 1016 if (p_tsx)1017 *p_tsx = NULL;1018 1016 return status; 1019 1017 } -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r368 r376 1331 1331 1332 1332 /* Send the request. */ 1333 status = pjsip_dlg_send_request( call->inv->dlg, tdata, NULL);1333 status = pjsip_dlg_send_request( call->inv->dlg, tdata, -1, NULL); 1334 1334 if (status != PJ_SUCCESS) { 1335 1335 pjsua_perror(THIS_FILE, "Unable to send MESSAGE request", status); … … 1374 1374 1375 1375 /* Send the request. */ 1376 status = pjsip_dlg_send_request( call->inv->dlg, tdata, NULL);1376 status = pjsip_dlg_send_request( call->inv->dlg, tdata, -1, NULL); 1377 1377 if (status != PJ_SUCCESS) { 1378 1378 pjsua_perror(THIS_FILE, "Unable to send MESSAGE request", status);
Note: See TracChangeset
for help on using the changeset viewer.