Changeset 4826
- Timestamp:
- Apr 24, 2014 9:45:52 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app_cli.c
r4729 r4826 370 370 /* Fill buddy id */ 371 371 pj_ansi_snprintf(data_out, sizeof(data_out), "%d", ids[i]+1); 372 pj_strdup2(param->pool, ¶m->choice[i].value, data_out); 372 pj_strdup2(param->pool, ¶m->choice[param->cnt].value, 373 data_out); 373 374 pj_bzero(data_out, PJ_ARRAY_SIZE(data_out)); 374 375 … … 382 383 info.uri.ptr); 383 384 384 pj_strdup2(param->pool, ¶m->choice[i].desc, data_out); 385 pj_strdup2(param->pool, ¶m->choice[param->cnt].desc, 386 data_out); 385 387 if (++param->cnt >= (param->max_cnt-1)) 386 388 break; … … 390 392 /* Add URL input option */ 391 393 pj_ansi_snprintf(data_out, sizeof(data_out), "URL"); 392 pj_strdup2(param->pool, ¶m->choice[ i].value, data_out);394 pj_strdup2(param->pool, ¶m->choice[param->cnt].value, data_out); 393 395 pj_ansi_snprintf(data_out, sizeof(data_out), "An URL"); 394 pj_strdup2(param->pool, ¶m->choice[ i].desc, data_out);396 pj_strdup2(param->pool, ¶m->choice[param->cnt].desc, data_out); 395 397 ++param->cnt; 396 398 } … … 425 427 pj_bzero(buf, sizeof(buf)); 426 428 pj_ansi_snprintf(buf, sizeof(buf), "%d", acc_ids[i]); 427 pj_strdup2(param->pool, ¶m->choice[ i].value, buf);428 pj_strdup2(param->pool, ¶m->choice[ i].desc, buf_out);429 pj_strdup2(param->pool, ¶m->choice[param->cnt].value, buf); 430 pj_strdup2(param->pool, ¶m->choice[param->cnt].desc, buf_out); 429 431 if (++param->cnt >= param->max_cnt) 430 432 break; … … 452 454 pj_ansi_snprintf(slot_id, sizeof(slot_id), 453 455 "%d", info.slot_id); 454 pj_strdup2(param->pool, ¶m->choice[ i].value, slot_id);456 pj_strdup2(param->pool, ¶m->choice[param->cnt].value, slot_id); 455 457 456 458 txlist[0] = '\0'; … … 471 473 txlist); 472 474 473 pj_strdup2(param->pool, ¶m->choice[ i].desc, desc);475 pj_strdup2(param->pool, ¶m->choice[param->cnt].desc, desc); 474 476 if (++param->cnt >= param->max_cnt) 475 477 break; … … 521 523 pj_ansi_snprintf(med_idx, sizeof(med_idx), "%d", 522 524 call_info.media[i].index); 523 pj_strdup2(param->pool, ¶m->choice[i].value, med_idx); 525 pj_strdup2(param->pool, ¶m->choice[param->cnt].value, 526 med_idx); 524 527 525 528 switch (call_info.media[i].status) { 526 529 case PJSUA_CALL_MEDIA_NONE: 527 pj_strdup2(param->pool, ¶m->choice[ i].desc,530 pj_strdup2(param->pool, ¶m->choice[param->cnt].desc, 528 531 "Status:None"); 529 532 break; 530 533 case PJSUA_CALL_MEDIA_ACTIVE: 531 pj_strdup2(param->pool, ¶m->choice[ i].desc,534 pj_strdup2(param->pool, ¶m->choice[param->cnt].desc, 532 535 "Status:Active"); 533 536 break; 534 537 case PJSUA_CALL_MEDIA_LOCAL_HOLD: 535 pj_strdup2(param->pool, ¶m->choice[ i].desc,538 pj_strdup2(param->pool, ¶m->choice[param->cnt].desc, 536 539 "Status:Local Hold"); 537 540 break; 538 541 case PJSUA_CALL_MEDIA_REMOTE_HOLD: 539 pj_strdup2(param->pool, ¶m->choice[ i].desc,542 pj_strdup2(param->pool, ¶m->choice[param->cnt].desc, 540 543 "Status:Remote Hold"); 541 544 break; 542 545 case PJSUA_CALL_MEDIA_ERROR: 543 pj_strdup2(param->pool, ¶m->choice[ i].desc,546 pj_strdup2(param->pool, ¶m->choice[param->cnt].desc, 544 547 "Status:Media Error"); 545 548 break; … … 655 658 pjsua_vid_win_get_info(wids[i], &wi); 656 659 pj_ansi_snprintf(win_id, sizeof(win_id), "%d", wids[i]); 657 pj_strdup2(param->pool, ¶m->choice[ i].value, win_id);660 pj_strdup2(param->pool, ¶m->choice[param->cnt].value, win_id); 658 661 659 662 pj_ansi_snprintf(desc, sizeof(desc), … … 662 665 wi.size.w, wi.size.h); 663 666 664 pj_strdup2(param->pool, ¶m->choice[ i].desc, desc);667 pj_strdup2(param->pool, ¶m->choice[param->cnt].desc, desc); 665 668 if (++param->cnt >= param->max_cnt) 666 669 break; … … 690 693 pjsua_call_get_info(ids[i], &call_info); 691 694 pj_ansi_snprintf(call_id, sizeof(call_id), "%d", ids[i]); 692 pj_strdup2(param->pool, ¶m->choice[i].value, call_id); 695 pj_strdup2(param->pool, ¶m->choice[param->cnt].value, 696 call_id); 693 697 pj_ansi_snprintf(desc, sizeof(desc), "%.*s [%.*s]", 694 698 (int)call_info.remote_info.slen, … … 696 700 (int)call_info.state_text.slen, 697 701 call_info.state_text.ptr); 698 pj_strdup2(param->pool, ¶m->choice[ i].desc, desc);702 pj_strdup2(param->pool, ¶m->choice[param->cnt].desc, desc); 699 703 if (++param->cnt >= param->max_cnt) 700 704 break;
Note: See TracChangeset
for help on using the changeset viewer.