Ignore:
Timestamp:
06/20/08 11:20:20 (2 years ago)
Author:
bart
Message:

Failed to stage the commit properly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • eaccelerator/trunk/session.c

    r286 r350  
    116116        int len; 
    117117        zval ret; 
     118#ifdef ZEND_ENGINE_2_3 
     119    ALLOCA_FLAG(use_heap); 
     120#endif 
    118121 
    119122        len = sizeof("sess_") + strlen(key); 
     123#ifdef ZEND_ENGINE_2_3 
     124        skey = do_alloca(len + 1, use_heap); 
     125#else 
    120126        skey = do_alloca(len + 1); 
     127#endif 
    121128        strcpy(skey, "sess_"); 
    122129        strcat(skey, key); 
     
    132139                *vallen = 0; 
    133140        } 
     141#ifdef ZEND_ENGINE_2_3 
     142    free_alloca(skey, use_heap); 
     143#else 
    134144        free_alloca(skey); 
     145#endif 
    135146        return SUCCESS; 
    136147} 
     
    140151        char *skey; 
    141152        int len; 
     153    int result; 
    142154        time_t ttl = INI_INT("session.gc_maxlifetime"); 
    143155        zval sval; 
     156#ifdef ZEND_ENGINE_2_3 
     157    ALLOCA_FLAG(use_heap); 
     158#endif 
    144159 
    145160        len = sizeof("sess_") + strlen(key); 
     161#ifdef ZEND_ENGINE_2_3 
     162        skey = do_alloca(len + 1, use_heap); 
     163#else 
    146164        skey = do_alloca(len + 1); 
     165#endif 
    147166        strcpy(skey, "sess_"); 
    148167        strcat(skey, key); 
     
    156175        do_session_lock(skey TSRMLS_CC); 
    157176        if (eaccelerator_put(skey, len, &sval, ttl, eaccelerator_sessions_cache_place TSRMLS_CC)) { 
    158                 free_alloca(skey); 
    159                 return SUCCESS; 
     177                result = SUCCESS; 
    160178        } else { 
    161                 free_alloca(skey); 
    162                 return FAILURE; 
    163         } 
     179                result = FAILURE; 
     180        } 
     181 
     182#ifdef ZEND_ENGINE_2_3 
     183    free_alloca(skey, use_heap); 
     184#else 
     185        free_alloca(skey); 
     186#endif 
     187 
     188    return result; 
    164189} 
    165190 
     
    168193        char *skey; 
    169194        int len; 
     195    int result; 
     196#ifdef ZEND_ENGINE_2_3 
     197    ALLOCA_FLAG(use_heap); 
     198#endif 
    170199 
    171200        len = sizeof("sess_") + strlen(key); 
     201#ifdef ZEND_ENGINE_2_3 
     202        skey = do_alloca(len + 1, use_heap); 
     203#else 
    172204        skey = do_alloca(len + 1); 
     205#endif 
    173206        strcpy(skey, "sess_"); 
    174207        strcat(skey, key); 
    175208        if (eaccelerator_rm(skey, len, eaccelerator_sessions_cache_place TSRMLS_CC)) { 
    176                 free_alloca(skey); 
    177                 return SUCCESS; 
     209                result = SUCCESS; 
    178210        } else { 
    179                 free_alloca(skey); 
    180                 return FAILURE; 
    181         } 
     211                result = FAILURE; 
     212        } 
     213 
     214#ifdef ZEND_ENGINE_2_3 
     215    free_alloca(skey, use_heap); 
     216#else 
     217        free_alloca(skey); 
     218#endif 
     219 
     220    return result; 
    182221} 
    183222 
Note: See TracChangeset for help on using the changeset viewer.