Changeset 3443 for pjproject


Ignore:
Timestamp:
Mar 15, 2011 5:09:29 AM (14 years ago)
Author:
ming
Message:

Misc (re #1175) (thanks to Seth Hinze for the patch):

  • uri_test: Fixes a divide by zero error when the benchmark is run on a really fast machine.
  • presence: Fixes a compiler warning about potential referencing of an uninitialized variable.
  • echo_speex: Allow for compilation when PJMEDIA_HAS_SPEEX_AEC is not defined.
Location:
pjproject/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/echo_speex.c

    r2394 r3443  
    2424#include <pj/log.h> 
    2525#include <pj/pool.h> 
     26 
     27#if defined(PJMEDIA_HAS_SPEEX_AEC) && PJMEDIA_HAS_SPEEX_AEC != 0 
     28 
    2629#include <speex/speex_echo.h> 
    2730#include <speex/speex_preprocess.h> 
     
    186189} 
    187190 
     191#endif 
  • pjproject/trunk/pjsip/src/pjsip-simple/presence.c

    r3412 r3443  
    702702    const pj_str_t STR_MULTIPART = { "multipart", 9 }; 
    703703    pjsip_ctype_hdr *ctype_hdr; 
    704     pj_status_t status; 
     704    pj_status_t status = PJ_SUCCESS; 
    705705 
    706706    *p_st_text = NULL; 
  • pjproject/trunk/pjsip/src/test/uri_test.c

    r2660 r3443  
    953953    pj_highprec_mul(avg_parse, AVERAGE_URL_LEN); 
    954954    pj_highprec_div(avg_parse, var.parse_len); 
     955    if (avg_parse == 0) 
     956        avg_parse = 1; 
    955957    avg_parse = 1000000 / avg_parse; 
    956958 
     
    970972    pj_highprec_mul(avg_print, AVERAGE_URL_LEN); 
    971973    pj_highprec_div(avg_print, var.parse_len); 
     974    if (avg_print == 0) 
     975        avg_print = 1; 
    972976    avg_print = 1000000 / avg_print; 
    973977 
     
    987991    pj_highprec_mul(avg_cmp, AVERAGE_URL_LEN); 
    988992    pj_highprec_div(avg_cmp, var.cmp_len); 
     993    if (avg_cmp == 0) 
     994        avg_cmp = 1; 
    989995    avg_cmp = 1000000 / avg_cmp; 
    990996 
Note: See TracChangeset for help on using the changeset viewer.