Changeset 750


Ignore:
Timestamp:
Oct 4, 2006 8:46:27 PM (18 years ago)
Author:
bennylp
Message:

Fixed compilation errors when threading is disabled (PJ_HAS_THREADS=0) and safe ioqueue unregistration is disabled (PJ_IOQUEUE_HAS_SAFE_UNREG=0). Also increase PJ_IOQUEUE_MAX_HANDLES for minimum config to 16 in config_sample.h [thanks Olivier Gournet].

Location:
pjproject/trunk/pjlib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/config_site_sample.h

    r695 r750  
    4545#   define PJ_HAS_ERROR_STRING          0 
    4646#   undef PJ_IOQUEUE_MAX_HANDLES 
    47 #   define PJ_IOQUEUE_MAX_HANDLES       4 
    48 #   define PJSIP_MAX_TSX_COUNT          16 
    49 #   define PJSIP_MAX_DIALOG_COUNT       16 
     47#   define PJ_IOQUEUE_MAX_HANDLES       16 
     48#   define PJSIP_MAX_TSX_COUNT          15 
     49#   define PJSIP_MAX_DIALOG_COUNT       15 
    5050#   define PJSIP_UDP_SO_SNDBUF_SIZE     4000 
    5151#   define PJSIP_UDP_SO_RCVBUF_SIZE     4000 
     
    5454#   define PJSIP_AUTH_QOP_SUPPORT       0 
    5555#   define PJMEDIA_HAS_LARGE_FILTER     0 
    56 #   define PJMEDIA_HAS_SMALL_FILTER     1 
     56#   define PJMEDIA_HAS_SMALL_FILTER     0 
    5757 
    5858 
  • pjproject/trunk/pjlib/src/pj/ioqueue_common_abs.c

    r624 r750  
    184184    pj_mutex_lock(h->mutex); 
    185185 
    186     if (h->closing) { 
     186    if (IS_CLOSING(h)) { 
    187187        pj_mutex_unlock(h->mutex); 
    188188        return; 
     
    362362    pj_mutex_lock(h->mutex); 
    363363 
    364     if (h->closing) { 
     364    if (IS_CLOSING(h)) { 
    365365        pj_mutex_unlock(h->mutex); 
    366366        return; 
     
    511511    } 
    512512 
    513     if (h->closing) { 
     513    if (IS_CLOSING(h)) { 
    514514        pj_mutex_unlock(h->mutex); 
    515515        return; 
     
    561561 
    562562    /* Check if key is closing. */ 
    563     if (key->closing) 
     563    if (IS_CLOSING(key)) 
    564564        return PJ_ECANCELLED; 
    565565 
     
    623623 
    624624    /* Check if key is closing. */ 
    625     if (key->closing) 
     625    if (IS_CLOSING(key)) 
    626626        return PJ_ECANCELLED; 
    627627 
     
    692692 
    693693    /* Check if key is closing. */ 
    694     if (key->closing) 
     694    if (IS_CLOSING(key)) 
    695695        return PJ_ECANCELLED; 
    696696 
     
    801801 
    802802    /* Check if key is closing. */ 
    803     if (key->closing) 
     803    if (IS_CLOSING(key)) 
    804804        return PJ_ECANCELLED; 
    805805 
     
    914914 
    915915    /* Check if key is closing. */ 
    916     if (key->closing) 
     916    if (IS_CLOSING(key)) 
    917917        return PJ_ECANCELLED; 
    918918 
     
    979979 
    980980    /* Check if key is closing. */ 
    981     if (key->closing) 
     981    if (IS_CLOSING(key)) 
    982982        return PJ_ECANCELLED; 
    983983 
  • pjproject/trunk/pjlib/src/pj/ioqueue_select.c

    r592 r750  
    697697 
    698698        if ( (key_has_pending_write(h) || key_has_pending_connect(h)) 
    699              && PJ_FD_ISSET(h->fd, &wfdset) && !h->closing) 
     699             && PJ_FD_ISSET(h->fd, &wfdset) && !IS_CLOSING(h)) 
    700700        { 
    701701#if PJ_IOQUEUE_HAS_SAFE_UNREG 
     
    709709        /* Scan for readable socket. */ 
    710710        if ((key_has_pending_read(h) || key_has_pending_accept(h)) 
    711             && PJ_FD_ISSET(h->fd, &rfdset) && !h->closing) 
     711            && PJ_FD_ISSET(h->fd, &rfdset) && !IS_CLOSING(h)) 
    712712        { 
    713713#if PJ_IOQUEUE_HAS_SAFE_UNREG 
     
    721721#if PJ_HAS_TCP 
    722722        if (key_has_pending_connect(h) && PJ_FD_ISSET(h->fd, &xfdset) && 
    723             !h->closing)  
     723            !IS_CLOSING(h))  
    724724        { 
    725725#if PJ_IOQUEUE_HAS_SAFE_UNREG 
  • pjproject/trunk/pjlib/src/pj/os_core_unix.c

    r746 r750  
    185185PJ_DEF(pj_bool_t) pj_thread_is_registered(void) 
    186186{ 
     187#if PJ_HAS_THREADS 
    187188    return pj_thread_local_get(thread_tls_id) != 0; 
     189#else 
     190    pj_assert("pj_thread_is_registered() called in non-threading mode!"); 
     191    return PJ_TRUE; 
     192#endif 
    188193} 
    189194 
     
    945950    return PJ_SUCCESS; 
    946951#else /* PJ_HAS_THREADS */ 
    947     return (pj_mutex_t*)1; 
     952    *ptr_mutex = (pj_mutex_t*)1; 
     953    return PJ_SUCCESS; 
    948954#endif 
    949955} 
Note: See TracChangeset for help on using the changeset viewer.