aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-05-25 15:15:26 +0000
committerChristian Grothoff <christian@grothoff.org>2011-05-25 15:15:26 +0000
commitcf3e23a07b1d0369d4d8fda120bc5594c68162a0 (patch)
tree0f0b561e318d58fe43233dc01f09257c0434b47e /src/util
parentfb65df3019ce39af825fb3a32e8a6196e0c97ef3 (diff)
downloadgnunet-cf3e23a07b1d0369d4d8fda120bc5594c68162a0.tar.gz
gnunet-cf3e23a07b1d0369d4d8fda120bc5594c68162a0.zip
minor code cleanup
Diffstat (limited to 'src/util')
-rw-r--r--src/util/client.c3
-rw-r--r--src/util/connection.c9
-rw-r--r--src/util/crypto_hash.c3
3 files changed, 5 insertions, 10 deletions
diff --git a/src/util/client.c b/src/util/client.c
index e131d1ae9..e72d410b5 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -597,8 +597,7 @@ GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *sock,
597 sock->receive_timeout = GNUNET_TIME_relative_to_absolute (timeout); 597 sock->receive_timeout = GNUNET_TIME_relative_to_absolute (timeout);
598 if (GNUNET_YES == sock->msg_complete) 598 if (GNUNET_YES == sock->msg_complete)
599 { 599 {
600 sock->receive_task = GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_NO_TASK, 600 sock->receive_task = GNUNET_SCHEDULER_add_now (&receive_task, sock);
601 &receive_task, sock);
602 } 601 }
603 else 602 else
604 { 603 {
diff --git a/src/util/connection.c b/src/util/connection.c
index 9769c3cba..e0eebcdbf 100644
--- a/src/util/connection.c
+++ b/src/util/connection.c
@@ -642,8 +642,7 @@ connect_fail_continuation (struct GNUNET_CONNECTION_Handle *h)
642 h); 642 h);
643#endif 643#endif
644 h->ccs -= COCO_RECEIVE_AGAIN; 644 h->ccs -= COCO_RECEIVE_AGAIN;
645 h->read_task = GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_NO_TASK, 645 h->read_task = GNUNET_SCHEDULER_add_now (&receive_again, h);
646 &receive_again, h);
647 } 646 }
648 if (0 != (h->ccs & COCO_TRANSMIT_READY)) 647 if (0 != (h->ccs & COCO_TRANSMIT_READY))
649 { 648 {
@@ -657,8 +656,7 @@ connect_fail_continuation (struct GNUNET_CONNECTION_Handle *h)
657 h->nth.timeout_task = GNUNET_SCHEDULER_NO_TASK; 656 h->nth.timeout_task = GNUNET_SCHEDULER_NO_TASK;
658 h->ccs -= COCO_TRANSMIT_READY; 657 h->ccs -= COCO_TRANSMIT_READY;
659 GNUNET_assert (h->write_task == GNUNET_SCHEDULER_NO_TASK); 658 GNUNET_assert (h->write_task == GNUNET_SCHEDULER_NO_TASK);
660 h->write_task = GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_NO_TASK, 659 h->write_task = GNUNET_SCHEDULER_add_now (&transmit_ready, h);
661 &transmit_ready, h);
662 } 660 }
663 if (0 != (h->ccs & COCO_DESTROY_CONTINUATION)) 661 if (0 != (h->ccs & COCO_DESTROY_CONTINUATION))
664 { 662 {
@@ -698,8 +696,7 @@ connect_success_continuation (struct GNUNET_CONNECTION_Handle *h)
698 h); 696 h);
699#endif 697#endif
700 h->ccs -= COCO_RECEIVE_AGAIN; 698 h->ccs -= COCO_RECEIVE_AGAIN;
701 h->read_task = GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_NO_TASK, 699 h->read_task = GNUNET_SCHEDULER_add_now (&receive_again, h);
702 &receive_again, h);
703 } 700 }
704 if (0 != (h->ccs & COCO_TRANSMIT_READY)) 701 if (0 != (h->ccs & COCO_TRANSMIT_READY))
705 { 702 {
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c
index 88c7ddd19..670f5e73a 100644
--- a/src/util/crypto_hash.c
+++ b/src/util/crypto_hash.c
@@ -161,8 +161,7 @@ file_hash_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
161 return; 161 return;
162 } 162 }
163 fhc->task 163 fhc->task
164 = GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_NO_TASK, 164 = GNUNET_SCHEDULER_add_now (&file_hash_task, fhc);
165 &file_hash_task, fhc);
166} 165}
167 166
168 167