diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-04-20 08:22:44 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-04-20 08:22:44 +0000 |
commit | e027e2d0362fc9ebff1c679bbc50425a5d0db3f9 (patch) | |
tree | 944d252999c71fdfb9d76730775ecdc9c9b2ddd1 /src | |
parent | 9819edebf96af2f2fefd937b18925d00e082e363 (diff) | |
download | gnunet-e027e2d0362fc9ebff1c679bbc50425a5d0db3f9.tar.gz gnunet-e027e2d0362fc9ebff1c679bbc50425a5d0db3f9.zip |
SHUTDOWN
Diffstat (limited to 'src')
-rw-r--r-- | src/dht/gnunet-service-dht.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index 3311763cb..1e826096c 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c | |||
@@ -1056,7 +1056,7 @@ try_core_send (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1056 | 1056 | ||
1057 | peer->send_task = GNUNET_SCHEDULER_NO_TASK; | 1057 | peer->send_task = GNUNET_SCHEDULER_NO_TASK; |
1058 | 1058 | ||
1059 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 1059 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
1060 | return; | 1060 | return; |
1061 | 1061 | ||
1062 | if (peer->th != NULL) | 1062 | if (peer->th != NULL) |
@@ -1491,7 +1491,7 @@ update_core_preference (void *cls, | |||
1491 | struct PeerInfo *peer = cls; | 1491 | struct PeerInfo *peer = cls; |
1492 | uint64_t preference; | 1492 | uint64_t preference; |
1493 | unsigned int matching; | 1493 | unsigned int matching; |
1494 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 1494 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
1495 | { | 1495 | { |
1496 | return; | 1496 | return; |
1497 | } | 1497 | } |
@@ -1843,7 +1843,7 @@ periodic_ping_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1843 | struct GNUNET_MessageHeader ping_message; | 1843 | struct GNUNET_MessageHeader ping_message; |
1844 | struct DHT_MessageContext msg_ctx; | 1844 | struct DHT_MessageContext msg_ctx; |
1845 | 1845 | ||
1846 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 1846 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
1847 | return; | 1847 | return; |
1848 | 1848 | ||
1849 | ping_message.size = htons (sizeof (struct GNUNET_MessageHeader)); | 1849 | ping_message.size = htons (sizeof (struct GNUNET_MessageHeader)); |
@@ -3741,7 +3741,7 @@ remove_recent (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
3741 | GNUNET_free (req); | 3741 | GNUNET_free (req); |
3742 | 3742 | ||
3743 | /* | 3743 | /* |
3744 | if ((tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) && (0 == GNUNET_CONTAINER_multihashmap_size(recent.hashmap)) && (0 == GNUNET_CONTAINER_heap_get_size(recent.minHeap))) | 3744 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) && (0 == GNUNET_CONTAINER_multihashmap_size(recent.hashmap)) && (0 == GNUNET_CONTAINER_heap_get_size(recent.minHeap))) |
3745 | { | 3745 | { |
3746 | GNUNET_CONTAINER_multihashmap_destroy(recent.hashmap); | 3746 | GNUNET_CONTAINER_multihashmap_destroy(recent.hashmap); |
3747 | GNUNET_CONTAINER_heap_destroy(recent.minHeap); | 3747 | GNUNET_CONTAINER_heap_destroy(recent.minHeap); |
@@ -4199,7 +4199,7 @@ republish_content (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
4199 | 4199 | ||
4200 | unsigned int results; | 4200 | unsigned int results; |
4201 | 4201 | ||
4202 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 4202 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
4203 | { | 4203 | { |
4204 | GNUNET_free (put_context); | 4204 | GNUNET_free (put_context); |
4205 | return; | 4205 | return; |
@@ -4358,7 +4358,7 @@ malicious_put_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
4358 | static GNUNET_HashCode key; | 4358 | static GNUNET_HashCode key; |
4359 | uint32_t random_key; | 4359 | uint32_t random_key; |
4360 | 4360 | ||
4361 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 4361 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
4362 | return; | 4362 | return; |
4363 | put_message.header.size = htons (sizeof (struct GNUNET_DHT_PutMessage)); | 4363 | put_message.header.size = htons (sizeof (struct GNUNET_DHT_PutMessage)); |
4364 | put_message.header.type = htons (GNUNET_MESSAGE_TYPE_DHT_PUT); | 4364 | put_message.header.type = htons (GNUNET_MESSAGE_TYPE_DHT_PUT); |
@@ -4409,7 +4409,7 @@ malicious_get_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
4409 | static GNUNET_HashCode key; | 4409 | static GNUNET_HashCode key; |
4410 | uint32_t random_key; | 4410 | uint32_t random_key; |
4411 | 4411 | ||
4412 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 4412 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
4413 | return; | 4413 | return; |
4414 | 4414 | ||
4415 | get_message.header.size = htons (sizeof (struct GNUNET_DHT_GetMessage)); | 4415 | get_message.header.size = htons (sizeof (struct GNUNET_DHT_GetMessage)); |
@@ -4486,7 +4486,7 @@ send_find_peer_message (void *cls, | |||
4486 | double multiplier; | 4486 | double multiplier; |
4487 | double count_per_interval; | 4487 | double count_per_interval; |
4488 | #endif | 4488 | #endif |
4489 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 4489 | if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) |
4490 | return; | 4490 | return; |
4491 | 4491 | ||
4492 | if ((newly_found_peers > bucket_size) && (GNUNET_YES == do_find_peer)) /* If we are finding peers already, no need to send out our request right now! */ | 4492 | if ((newly_found_peers > bucket_size) && (GNUNET_YES == do_find_peer)) /* If we are finding peers already, no need to send out our request right now! */ |