Changeset 2818


Ignore:
Timestamp:
Jun 25, 2009 1:27:02 PM (15 years ago)
Author:
bennylp
Message:

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.
Location:
pjproject/branches/1.0
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.0/pjlib/include/pj/math.h

    r2394 r2818  
    141141    delta = val - stat->fmean_; 
    142142    stat->fmean_ += delta/stat->n; 
    143     stat->mean = (int) stat->fmean_; 
     143     
     144    /* Return mean value with 'rounding' */ 
     145    stat->mean = (int) (stat->fmean_ + 0.5); 
    144146 
    145147    stat->m2_ += (int)(delta * (val-stat->fmean_)); 
  • pjproject/branches/1.0/pjmedia/src/pjmedia/stream.c

    r2543 r2818  
    18841884        stream->jb_mutex = NULL; 
    18851885    } 
     1886 
     1887    /* Destroy jitter buffer */ 
     1888    if (stream->jb) 
     1889        pjmedia_jbuf_destroy(stream->jb); 
    18861890 
    18871891    return PJ_SUCCESS; 
  • pjproject/branches/1.0/pjmedia/src/test/sdp_neg_test.c

    r2548 r2818  
    4040}; 
    4141 
    42 struct test 
     42static struct test 
    4343{ 
    4444    const char          *title; 
  • pjproject/branches/1.0/pjsip-apps/src/pjsua/pjsua_app.c

    r2800 r2818  
    31323132                    pjsua_buddy_info binfo; 
    31333133                    pjsua_buddy_get_info(result.nb_result-1, &binfo); 
    3134                     uri = binfo.uri.ptr; 
     3134                    tmp.ptr = buf; 
     3135                    pj_strncpy(&tmp, &binfo.uri, sizeof(buf)); 
    31353136                } 
    31363137 
    31373138            } else if (result.uri_result) { 
    3138                 uri = result.uri_result; 
     3139                tmp = pj_str(result.uri_result); 
     3140            } else { 
     3141                tmp.slen = 0; 
    31393142            } 
    31403143             
    3141             tmp = pj_str(uri); 
    31423144            pjsua_call_make_call( current_acc, &tmp, 0, NULL, NULL, NULL); 
    31433145            break; 
     
    31633165                } 
    31643166                pjsua_buddy_get_info(result.nb_result-1, &binfo); 
    3165                 uri = binfo.uri.ptr; 
     3167                tmp.ptr = buf; 
     3168                pj_strncpy(&tmp, &binfo.uri, sizeof(buf)); 
    31663169            } else { 
    3167                 uri =  result.uri_result; 
     3170                tmp = pj_str(result.uri_result); 
    31683171            } 
    31693172 
     
    31713174                pj_status_t status; 
    31723175             
    3173                 tmp = pj_str(uri); 
    31743176                status = pjsua_call_make_call(current_acc, &tmp, 0, NULL, 
    31753177                                              NULL, NULL); 
     
    32093211                    pjsua_buddy_info binfo; 
    32103212                    pjsua_buddy_get_info(result.nb_result-1, &binfo); 
    3211                     uri = binfo.uri.ptr; 
     3213                    tmp.ptr = buf; 
     3214                    pj_strncpy_with_null(&tmp, &binfo.uri, sizeof(buf)); 
     3215                    uri = buf; 
    32123216                } 
    32133217 
     
    37723776                    pjsua_buddy_info binfo; 
    37733777                    pjsua_buddy_get_info(result.nb_result-1, &binfo); 
    3774                     uri = binfo.uri.ptr; 
     3778                    tmp.ptr = buf; 
     3779                    pj_strncpy_with_null(&tmp, &binfo.uri, sizeof(buf)); 
     3780                    uri = buf; 
    37753781                } 
    37763782 
Note: See TracChangeset for help on using the changeset viewer.