diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-01-24 17:18:52 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-01-24 17:18:52 -0500 |
commit | 2c6b3246fd9e3a3fa4f1a4b0126f0fc1e07d628c (patch) | |
tree | 8c98772717906d40a9555656c82ad926d770192a /evthread.c | |
parent | 95e2455cdbf840bdcf913f4ef59d0109babd3d6a (diff) | |
parent | c94a5f2a2cce7b6751a95343e0d80b7d150add31 (diff) | |
download | libevent-2c6b3246fd9e3a3fa4f1a4b0126f0fc1e07d628c.tar.gz |
Merge remote-tracking branch 'origin/patches-2.0'
Diffstat (limited to 'evthread.c')
-rw-r--r-- | evthread.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -85,7 +85,12 @@ evthread_set_lock_callbacks(const struct evthread_lock_callbacks *cbs) } if (target->alloc) { /* Uh oh; we already had locking callbacks set up.*/ - if (!memcmp(target, cbs, sizeof(_evthread_lock_fns))) { + if (target->lock_api_version == cbs->lock_api_version && + target->supported_locktypes == cbs->supported_locktypes && + target->alloc == cbs->alloc && + target->free == cbs->free && + target->lock == cbs->lock && + target->unlock == cbs->unlock) { /* no change -- allow this. */ return 0; } @@ -118,7 +123,11 @@ evthread_set_condition_callbacks(const struct evthread_condition_callbacks *cbs) } if (target->alloc_condition) { /* Uh oh; we already had condition callbacks set up.*/ - if (!memcmp(target, cbs, sizeof(_evthread_cond_fns))) { + if (target->condition_api_version == cbs->condition_api_version && + target->alloc_condition == cbs->alloc_condition && + target->free_condition == cbs->free_condition && + target->signal_condition == cbs->signal_condition && + target->wait_condition == cbs->wait_condition) { /* no change -- allow this. */ return 0; } |