- Timestamp:
- Dec 2, 2006 7:25:29 AM (18 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip-ua/sip_regc.h
r799 r843 231 231 232 232 /** 233 * Create REGISTER request to unregister all contacts from server records. 233 * Create REGISTER request to unregister the contacts that were previously 234 * registered by this client registration. 234 235 * 235 236 * @param regc The client registration structure. … … 240 241 PJ_DECL(pj_status_t) pjsip_regc_unregister(pjsip_regc *regc, 241 242 pjsip_tx_data **p_tdata); 243 244 /** 245 * Create REGISTER request to unregister all contacts from server records. 246 * Note that this will unregister all registered contact for the AOR 247 * including contacts registered by other user agents. To only unregister 248 * contact registered by this client registration instance, use 249 * #pjsip_regc_unregister() instead. 250 * 251 * @param regc The client registration structure. 252 * @param p_tdata Pointer to receive the REGISTER request. 253 * 254 * @return PJ_SUCCESS on success. 255 */ 256 PJ_DECL(pj_status_t) pjsip_regc_unregister_all(pjsip_regc *regc, 257 pjsip_tx_data **p_tdata); 242 258 243 259 /** -
pjproject/trunk/pjsip/src/pjsip-ua/sip_reg.c
r841 r843 444 444 445 445 msg = tdata->msg; 446 pjsip_msg_add_hdr(msg, pjsip_hdr_shallow_clone(tdata->pool, 447 regc->contact_hdr)); 448 pjsip_msg_add_hdr( msg, (pjsip_hdr*)regc->unreg_expires_hdr); 449 450 *p_tdata = tdata; 451 return PJ_SUCCESS; 452 } 453 454 PJ_DEF(pj_status_t) pjsip_regc_unregister_all(pjsip_regc *regc, 455 pjsip_tx_data **p_tdata) 456 { 457 pjsip_tx_data *tdata; 458 pjsip_msg *msg; 459 pj_status_t status; 460 461 PJ_ASSERT_RETURN(regc && p_tdata, PJ_EINVAL); 462 463 if (regc->timer.id != 0) { 464 pjsip_endpt_cancel_timer(regc->endpt, ®c->timer); 465 regc->timer.id = 0; 466 } 467 468 status = create_request(regc, &tdata); 469 if (status != PJ_SUCCESS) 470 return status; 471 472 msg = tdata->msg; 446 473 pjsip_msg_add_hdr( msg, (pjsip_hdr*)regc->unreg_contact_hdr); 447 474 pjsip_msg_add_hdr( msg, (pjsip_hdr*)regc->unreg_expires_hdr);
Note: See TracChangeset
for help on using the changeset viewer.