diff options
author | Benny Prijono <bennylp@teluu.com> | 2009-06-25 13:27:02 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2009-06-25 13:27:02 +0000 |
commit | 1028a42bfdd13453b39c3a19ebc59959df565bec (patch) | |
tree | e3c61d6e88949e0711963da9d30b751d817829e7 /pjsip-apps | |
parent | d749012c94efaf397371b2294618465ec00fea08 (diff) |
Ticket #773 (mixed fixes): backported changes from #772:
- from r2566: bug in pjsua application when reading the URL from the buddy list, causing corrupt/invalid URI to be returned. Thanks Robert Cichielo for the report.
- from r2577: Updated floating point version of math statistic to return the rounded mean value.
- from r2586: Updated stream_destroy() to call jbuf_destroy().
- from r2604: Changed var 'test' (in sdp_neg_test.c) from a global var to static var, since there was naming conflict with libg7221codec.
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.0@2818 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps')
-rw-r--r-- | pjsip-apps/src/pjsua/pjsua_app.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/pjsip-apps/src/pjsua/pjsua_app.c b/pjsip-apps/src/pjsua/pjsua_app.c index 7caf8c2a..96ea1d83 100644 --- a/pjsip-apps/src/pjsua/pjsua_app.c +++ b/pjsip-apps/src/pjsua/pjsua_app.c @@ -3131,14 +3131,16 @@ void console_app_main(const pj_str_t *uri_to_call) } else { pjsua_buddy_info binfo; pjsua_buddy_get_info(result.nb_result-1, &binfo); - uri = binfo.uri.ptr; + tmp.ptr = buf; + pj_strncpy(&tmp, &binfo.uri, sizeof(buf)); } } else if (result.uri_result) { - uri = result.uri_result; + tmp = pj_str(result.uri_result); + } else { + tmp.slen = 0; } - tmp = pj_str(uri); pjsua_call_make_call( current_acc, &tmp, 0, NULL, NULL, NULL); break; @@ -3162,15 +3164,15 @@ void console_app_main(const pj_str_t *uri_to_call) continue; } pjsua_buddy_get_info(result.nb_result-1, &binfo); - uri = binfo.uri.ptr; + tmp.ptr = buf; + pj_strncpy(&tmp, &binfo.uri, sizeof(buf)); } else { - uri = result.uri_result; + tmp = pj_str(result.uri_result); } for (i=0; i<my_atoi(menuin); ++i) { pj_status_t status; - tmp = pj_str(uri); status = pjsua_call_make_call(current_acc, &tmp, 0, NULL, NULL, NULL); if (status != PJ_SUCCESS) @@ -3208,7 +3210,9 @@ void console_app_main(const pj_str_t *uri_to_call) } else { pjsua_buddy_info binfo; pjsua_buddy_get_info(result.nb_result-1, &binfo); - uri = binfo.uri.ptr; + tmp.ptr = buf; + pj_strncpy_with_null(&tmp, &binfo.uri, sizeof(buf)); + uri = buf; } } else if (result.uri_result) { @@ -3771,7 +3775,9 @@ void console_app_main(const pj_str_t *uri_to_call) } else { pjsua_buddy_info binfo; pjsua_buddy_get_info(result.nb_result-1, &binfo); - uri = binfo.uri.ptr; + tmp.ptr = buf; + pj_strncpy_with_null(&tmp, &binfo.uri, sizeof(buf)); + uri = buf; } } else if (result.uri_result) { |