Changeset 255 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c
- Timestamp:
- Mar 1, 2006 8:46:13 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_pres.c
r238 r255 455 455 * Dump presence status. 456 456 */ 457 void pjsua_pres_dump( void)457 void pjsua_pres_dump(pj_bool_t detail) 458 458 { 459 459 int acc_index; 460 460 int i; 461 461 462 463 /* 464 * When no detail is required, just dump number of server and client 465 * subscriptions. 466 */ 467 if (detail == PJ_FALSE) { 468 469 int count = 0; 470 471 for (acc_index=0; acc_index < pjsua.acc_cnt; ++acc_index) { 472 473 if (!pj_list_empty(&pjsua.acc[acc_index].pres_srv_list)) { 474 struct pjsua_srv_pres *uapres; 475 476 uapres = pjsua.acc[acc_index].pres_srv_list.next; 477 while (uapres != &pjsua.acc[acc_index].pres_srv_list) { 478 ++count; 479 uapres = uapres->next; 480 } 481 } 482 } 483 484 PJ_LOG(3,(THIS_FILE, "Number of server/UAS subscriptions: %d", 485 count)); 486 487 count = 0; 488 489 for (i=0; i<pjsua.buddy_cnt; ++i) { 490 if (pjsua.buddies[i].sub) { 491 ++count; 492 } 493 } 494 495 PJ_LOG(3,(THIS_FILE, "Number of client/UAC subscriptions: %d", 496 count)); 497 return; 498 } 499 500 501 /* 502 * Dumping all server (UAS) subscriptions 503 */ 462 504 PJ_LOG(3,(THIS_FILE, "Dumping pjsua server subscriptions:")); 505 463 506 for (acc_index=0; acc_index < pjsua.acc_cnt; ++acc_index) { 464 507 … … 468 511 469 512 if (pj_list_empty(&pjsua.acc[acc_index].pres_srv_list)) { 513 470 514 PJ_LOG(3,(THIS_FILE, " - none - ")); 515 471 516 } else { 472 517 struct pjsua_srv_pres *uapres; … … 484 529 } 485 530 531 /* 532 * Dumping all client (UAC) subscriptions 533 */ 486 534 PJ_LOG(3,(THIS_FILE, "Dumping pjsua client subscriptions:")); 535 487 536 if (pjsua.buddy_cnt == 0) { 537 488 538 PJ_LOG(3,(THIS_FILE, " - no buddy list - ")); 539 489 540 } else { 490 541 for (i=0; i<pjsua.buddy_cnt; ++i) {
Note: See TracChangeset
for help on using the changeset viewer.