aboutsummaryrefslogtreecommitdiff
path: root/src/util/service.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-02-04 19:38:38 +0100
committerChristian Grothoff <christian@grothoff.org>2020-02-04 19:38:38 +0100
commit3039adb9578b01b3649c5c8ae5f4d6d8f8a7d51d (patch)
tree3e2db2300f3f613115c8c346e9503c6c28bedf8d /src/util/service.c
parent1ca80565458244e9a9622d65bd3953fa3478372a (diff)
downloadgnunet-3039adb9578b01b3649c5c8ae5f4d6d8f8a7d51d.tar.gz
gnunet-3039adb9578b01b3649c5c8ae5f4d6d8f8a7d51d.zip
fix task prioritization with recent hack
Diffstat (limited to 'src/util/service.c')
-rw-r--r--src/util/service.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/util/service.c b/src/util/service.c
index 21b99547c..999a9e017 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -506,12 +506,12 @@ do_send (void *cls)
506 LOG (GNUNET_ERROR_TYPE_DEBUG, 506 LOG (GNUNET_ERROR_TYPE_DEBUG,
507 "service: sending message with type %u\n", 507 "service: sending message with type %u\n",
508 ntohs (client->msg->type)); 508 ntohs (client->msg->type));
509
510
511 client->send_task = NULL; 509 client->send_task = NULL;
512 buf = (const char *) client->msg; 510 buf = (const char *) client->msg;
513 left = ntohs (client->msg->size) - client->msg_pos; 511 left = ntohs (client->msg->size) - client->msg_pos;
514 ret = GNUNET_NETWORK_socket_send (client->sock, &buf[client->msg_pos], left); 512 ret = GNUNET_NETWORK_socket_send (client->sock,
513 &buf[client->msg_pos],
514 left);
515 GNUNET_assert (ret <= (ssize_t) left); 515 GNUNET_assert (ret <= (ssize_t) left);
516 if (0 == ret) 516 if (0 == ret)
517 { 517 {
@@ -581,11 +581,8 @@ service_mq_send (struct GNUNET_MQ_Handle *mq,
581 ntohs (msg->size)); 581 ntohs (msg->size));
582 client->msg = msg; 582 client->msg = msg;
583 client->msg_pos = 0; 583 client->msg_pos = 0;
584 client->send_task = 584 client->send_task = GNUNET_SCHEDULER_add_now (&do_send,
585 GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL, 585 client);
586 client->sock,
587 &do_send,
588 client);
589} 586}
590 587
591 588