Changeset 1453 in svn for trunk/mod_cacher/xc_cacher.c


Ignore:
Timestamp:
2013-11-08T09:08:04Z (22 months ago)
Author:
Xuefer
Message:

update func prototype for relocate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mod_cacher/xc_cacher.c

    r1451 r1453  
    180180    {
    181181        xc_entry_data_php_t *p = malloc(stored_php->size);
     182        xc_entry_data_php_t *backup = malloc(stored_php->size);
    182183        fprintf(stderr, "%lu\n", stored_php->size);
    183184        memcpy(p, stored_php, stored_php->size);
    184         xc_processor_relocate_xc_entry_data_php_t(stored_php, 0, p, p TSRMLS_CC);
     185        memcpy(backup, stored_php, stored_php->size);
     186        xc_processor_relocate_xc_entry_data_php_t(stored_php, stored_php, p, 0 TSRMLS_CC);
     187        assert(memcmp(stored_php, backup, stored_php->size) == 0);
     188
     189        memcpy(stored_php, p, p->size);
     190        xc_processor_relocate_xc_entry_data_php_t(p, 0, stored_php, stored_php TSRMLS_CC);
    185191    }
    186192#endif
Note: See TracChangeset for help on using the changeset viewer.