Changeset 1424 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
- Timestamp:
- Aug 25, 2007 1:36:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r1423 r1424 431 431 432 432 pjsua_var.acc[acc_id].online_status = is_online; 433 pjsua_pres_refresh(); 433 pj_bzero(&pjsua_var.acc[acc_id].rpid, sizeof(pjrpid_element)); 434 pjsua_pres_update_acc(acc_id, PJ_FALSE); 435 return PJ_SUCCESS; 436 } 437 438 439 /* 440 * Set online status with extended information 441 */ 442 PJ_DEF(pj_status_t) pjsua_acc_set_online_status2( pjsua_acc_id acc_id, 443 pj_bool_t is_online, 444 const pjrpid_element *pr) 445 { 446 PJ_ASSERT_RETURN(acc_id>=0 && acc_id<(int)PJ_ARRAY_SIZE(pjsua_var.acc), 447 PJ_EINVAL); 448 PJ_ASSERT_RETURN(pjsua_var.acc[acc_id].valid, PJ_EINVALIDOP); 449 450 pjsua_var.acc[acc_id].online_status = is_online; 451 pjrpid_element_dup(pjsua_var.pool, &pjsua_var.acc[acc_id].rpid, pr); 452 pjsua_pres_update_acc(acc_id, PJ_TRUE); 434 453 return PJ_SUCCESS; 435 454 } … … 690 709 info->has_registration = (acc->cfg.reg_uri.slen > 0); 691 710 info->online_status = acc->online_status; 692 711 pj_memcpy(&info->rpid, &acc->rpid, sizeof(pjrpid_element)); 712 if (info->rpid.note.slen) 713 info->online_status_text = info->rpid.note; 714 else if (info->online_status) 715 info->online_status_text = pj_str("Online"); 716 else 717 info->online_status_text = pj_str("Offline"); 718 693 719 if (acc->reg_last_err) { 694 720 info->status = (pjsip_status_code) acc->reg_last_err;
Note: See TracChangeset
for help on using the changeset viewer.