Changeset 3753 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
- Timestamp:
- Sep 18, 2011 2:59:56 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r3683 r3753 375 375 pjsua_acc *acc; 376 376 unsigned i, id; 377 pj_status_t status; 378 377 pj_status_t status = PJ_SUCCESS; 378 379 PJ_ASSERT_RETURN(cfg, PJ_EINVAL); 379 380 PJ_ASSERT_RETURN(pjsua_var.acc_cnt < PJ_ARRAY_SIZE(pjsua_var.acc), 380 381 PJ_ETOOMANY); … … 385 386 /* Verify media count */ 386 387 #if !defined(PJMEDIA_HAS_VIDEO) || (PJMEDIA_HAS_VIDEO == 0) 388 /* Enable PJMEDIA_HAS_VIDEO in your config_site.h! */ 387 389 PJ_ASSERT_RETURN(cfg->max_video_cnt == 0, PJ_EINVAL); 388 390 #endif 389 391 PJ_ASSERT_RETURN(cfg->max_audio_cnt + cfg->max_video_cnt <= 390 392 PJSUA_MAX_CALL_MEDIA, PJ_ETOOMANY); 393 394 PJ_LOG(4,(THIS_FILE, "Adding account: id=%.*s", 395 (int)cfg->id.slen, cfg->id.ptr)); 396 pj_log_push_indent(); 391 397 392 398 PJSUA_LOCK(); … … 434 440 for (i=0; i<acc->cfg.proxy_cnt; ++i) { 435 441 status = normalize_route_uri(acc->pool, &acc->cfg.proxy[i]); 436 if (status != PJ_SUCCESS) 442 if (status != PJ_SUCCESS) { 443 PJSUA_UNLOCK(); 444 pj_log_pop_indent(); 437 445 return status; 446 } 438 447 } 439 448 … … 444 453 acc->pool = NULL; 445 454 PJSUA_UNLOCK(); 455 pj_log_pop_indent(); 446 456 return status; 447 457 } … … 469 479 } 470 480 481 pj_log_pop_indent(); 471 482 return PJ_SUCCESS; 472 483 } … … 575 586 PJ_ASSERT_RETURN(pjsua_var.acc[acc_id].valid, PJ_EINVALIDOP); 576 587 588 PJ_LOG(4,(THIS_FILE, "Deleting account %d..", acc_id)); 589 pj_log_push_indent(); 590 577 591 PJSUA_LOCK(); 578 592 … … 625 639 PJ_LOG(4,(THIS_FILE, "Account id %d deleted", acc_id)); 626 640 641 pj_log_pop_indent(); 627 642 return PJ_SUCCESS; 628 643 } … … 656 671 PJSUA_MAX_CALL_MEDIA, PJ_ETOOMANY); 657 672 673 PJ_LOG(4,(THIS_FILE, "Modifying accunt %d", acc_id)); 674 pj_log_push_indent(); 658 675 659 676 PJSUA_LOCK(); … … 1041 1058 on_return: 1042 1059 PJSUA_UNLOCK(); 1060 pj_log_pop_indent(); 1043 1061 return status; 1044 1062 } … … 1056 1074 PJ_ASSERT_RETURN(pjsua_var.acc[acc_id].valid, PJ_EINVALIDOP); 1057 1075 1076 PJ_LOG(4,(THIS_FILE, "Acc %d: setting online status to %d..", 1077 acc_id, is_online)); 1078 pj_log_push_indent(); 1079 1058 1080 pjsua_var.acc[acc_id].online_status = is_online; 1059 1081 pj_bzero(&pjsua_var.acc[acc_id].rpid, sizeof(pjrpid_element)); 1060 1082 pjsua_pres_update_acc(acc_id, PJ_FALSE); 1083 1084 pj_log_pop_indent(); 1061 1085 return PJ_SUCCESS; 1062 1086 } … … 1074 1098 PJ_ASSERT_RETURN(pjsua_var.acc[acc_id].valid, PJ_EINVALIDOP); 1075 1099 1100 PJ_LOG(4,(THIS_FILE, "Acc %d: setting online status to %d..", 1101 acc_id, is_online)); 1102 pj_log_push_indent(); 1103 1076 1104 PJSUA_LOCK(); 1077 1105 pjsua_var.acc[acc_id].online_status = is_online; … … 1080 1108 1081 1109 pjsua_pres_update_acc(acc_id, PJ_TRUE); 1110 pj_log_pop_indent(); 1111 1082 1112 return PJ_SUCCESS; 1083 1113 } … … 1665 1695 return; 1666 1696 1697 pj_log_push_indent(); 1667 1698 PJSUA_LOCK(); 1668 1699 … … 1716 1747 if (acc_check_nat_addr(acc, param)) { 1717 1748 PJSUA_UNLOCK(); 1749 pj_log_pop_indent(); 1718 1750 return; 1719 1751 } … … 1778 1810 1779 1811 PJSUA_UNLOCK(); 1812 pj_log_pop_indent(); 1780 1813 } 1781 1814 … … 1965 1998 PJ_ASSERT_RETURN(pjsua_var.acc[acc_id].valid, PJ_EINVALIDOP); 1966 1999 2000 PJ_LOG(4,(THIS_FILE, "Acc %d: setting %sregistration..", 2001 acc_id, (renew? "" : "un"))); 2002 pj_log_push_indent(); 2003 1967 2004 PJSUA_LOCK(); 1968 2005 … … 2040 2077 status); 2041 2078 } else { 2042 PJ_LOG( 3,(THIS_FILE, "%s sent",2079 PJ_LOG(4,(THIS_FILE, "Acc %d: %s sent", acc_id, 2043 2080 (renew? "Registration" : "Unregistration"))); 2044 2081 } … … 2046 2083 on_return: 2047 2084 PJSUA_UNLOCK(); 2085 pj_log_pop_indent(); 2048 2086 return status; 2049 2087 } … … 2791 2829 return; 2792 2830 2831 PJ_LOG(4,(THIS_FILE, "Disconnected notification for transport %s", 2832 tp->obj_name)); 2833 pj_log_push_indent(); 2834 2793 2835 /* Shutdown this transport, to make sure that the transport manager 2794 2836 * will create a new transport for reconnection. … … 2818 2860 2819 2861 PJSUA_UNLOCK(); 2820 } 2862 pj_log_pop_indent(); 2863 }
Note: See TracChangeset
for help on using the changeset viewer.