Changeset 840 for trunk/xcache.c


Ignore:
Timestamp:
2012-03-25T04:51:51+02:00 (3 years ago)
Author:
moo
Message:

copy md5 digest correctly in notmemcpy mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache.c

    r832 r840  
    146146    xc_entry_data_php_t *p; 
    147147    for (p = php->cache->phps[php->hvalue]; p; p = p->next) { 
    148         if (memcmp(php->md5, p->md5, sizeof(php->md5)) == 0) { 
     148        if (memcmp(&php->md5, &p->md5, sizeof(php->md5)) == 0) { 
    149149            p->hits ++; 
    150150            return p; 
     
    170170        xc_entry_data_php_t *p; 
    171171        for (p = *pp; p; pp = &(p->next), p = p->next) { 
    172             if (memcmp(php->md5, p->md5, sizeof(php->md5)) == 0) { 
     172            if (memcmp(&php->md5, &p->md5, sizeof(php->md5)) == 0) { 
    173173                /* unlink */ 
    174174                *pp = p->next; 
     
    10881088static inline xc_hash_value_t xc_php_hash_md5(xc_entry_data_php_t *php TSRMLS_DC) /* {{{ */ 
    10891089{ 
    1090     return HASH_STR_S(php->md5, sizeof(php->md5)); 
     1090    return HASH_STR_S(&php->md5, sizeof(php->md5)); 
    10911091} 
    10921092/* }}} */ 
     
    11091109        PHP_MD5Update(&context, buf, n); 
    11101110    } 
    1111     PHP_MD5Final((unsigned char *) php->md5, &context); 
     1111    PHP_MD5Final((unsigned char *) php->md5.digest, &context); 
    11121112 
    11131113    php_stream_close(stream); 
Note: See TracChangeset for help on using the changeset viewer.