diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-11-16 20:12:13 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-11-16 20:12:13 +0000 |
commit | 98b16a036bade289cde134082b5b619d9b8e3fdf (patch) | |
tree | 3f67bda84d0f743fbec8188731bb30bc8c4e07c1 /src | |
parent | b4f6845e9c4b3748c26d9e7bd90bb7f2771e7570 (diff) | |
download | gnunet-98b16a036bade289cde134082b5b619d9b8e3fdf.tar.gz gnunet-98b16a036bade289cde134082b5b619d9b8e3fdf.zip |
do not use TC for transmission
Diffstat (limited to 'src')
-rw-r--r-- | src/core/gnunet-service-core.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index e8e12744f..ab6d6f81b 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c | |||
@@ -1377,17 +1377,31 @@ handle_client_request_info (void *cls, | |||
1377 | const struct GNUNET_MessageHeader *message) | 1377 | const struct GNUNET_MessageHeader *message) |
1378 | { | 1378 | { |
1379 | const struct RequestInfoMessage *rcm; | 1379 | const struct RequestInfoMessage *rcm; |
1380 | struct Client *pos; | ||
1380 | struct Neighbour *n; | 1381 | struct Neighbour *n; |
1381 | struct ConfigurationInfoMessage cim; | 1382 | struct ConfigurationInfoMessage cim; |
1382 | int32_t want_reserv; | 1383 | int32_t want_reserv; |
1383 | int32_t got_reserv; | 1384 | int32_t got_reserv; |
1384 | unsigned long long old_preference; | 1385 | unsigned long long old_preference; |
1385 | struct GNUNET_SERVER_TransmitContext *tc; | ||
1386 | 1386 | ||
1387 | #if DEBUG_CORE_CLIENT | 1387 | #if DEBUG_CORE_CLIENT |
1388 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1388 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1389 | "Core service receives `%s' request.\n", "REQUEST_INFO"); | 1389 | "Core service receives `%s' request.\n", "REQUEST_INFO"); |
1390 | #endif | 1390 | #endif |
1391 | pos = clients; | ||
1392 | while (pos != NULL) | ||
1393 | { | ||
1394 | if (client == pos->client_handle) | ||
1395 | break; | ||
1396 | pos = pos->next; | ||
1397 | } | ||
1398 | if (pos == NULL) | ||
1399 | { | ||
1400 | GNUNET_break (0); | ||
1401 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | ||
1402 | return; | ||
1403 | } | ||
1404 | |||
1391 | rcm = (const struct RequestInfoMessage *) message; | 1405 | rcm = (const struct RequestInfoMessage *) message; |
1392 | n = find_neighbour (&rcm->peer); | 1406 | n = find_neighbour (&rcm->peer); |
1393 | memset (&cim, 0, sizeof (cim)); | 1407 | memset (&cim, 0, sizeof (cim)); |
@@ -1452,15 +1466,12 @@ handle_client_request_info (void *cls, | |||
1452 | cim.header.size = htons (sizeof (struct ConfigurationInfoMessage)); | 1466 | cim.header.size = htons (sizeof (struct ConfigurationInfoMessage)); |
1453 | cim.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_CONFIGURATION_INFO); | 1467 | cim.header.type = htons (GNUNET_MESSAGE_TYPE_CORE_CONFIGURATION_INFO); |
1454 | cim.peer = rcm->peer; | 1468 | cim.peer = rcm->peer; |
1455 | |||
1456 | #if DEBUG_CORE_CLIENT | 1469 | #if DEBUG_CORE_CLIENT |
1457 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1470 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1458 | "Sending `%s' message to client.\n", "CONFIGURATION_INFO"); | 1471 | "Sending `%s' message to client.\n", "CONFIGURATION_INFO"); |
1459 | #endif | 1472 | #endif |
1460 | tc = GNUNET_SERVER_transmit_context_create (client); | 1473 | send_to_client (pos, &cim.header, GNUNET_NO); |
1461 | GNUNET_SERVER_transmit_context_append_message (tc, &cim.header); | 1474 | GNUNET_SERVER_receive_done (client, GNUNET_OK); |
1462 | GNUNET_SERVER_transmit_context_run (tc, | ||
1463 | GNUNET_TIME_UNIT_FOREVER_REL); | ||
1464 | } | 1475 | } |
1465 | 1476 | ||
1466 | 1477 | ||