diff options
-rw-r--r-- | src/dht/gnunet-service-dht_neighbours.c | 18 | ||||
-rw-r--r-- | src/nse/gnunet-service-nse.c | 14 | ||||
-rw-r--r-- | src/transport/plugin_transport_smtp.c | 36 |
3 files changed, 34 insertions, 34 deletions
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c index 889ef25ba..1d7eb560c 100644 --- a/src/dht/gnunet-service-dht_neighbours.c +++ b/src/dht/gnunet-service-dht_neighbours.c | |||
@@ -438,7 +438,7 @@ static struct GNUNET_HashCode my_identity_hash; | |||
438 | /** | 438 | /** |
439 | * Handle to CORE. | 439 | * Handle to CORE. |
440 | */ | 440 | */ |
441 | static struct GNUNET_CORE_Handle *coreAPI; | 441 | static struct GNUNET_CORE_Handle *core_api; |
442 | 442 | ||
443 | /** | 443 | /** |
444 | * Handle to ATS. | 444 | * Handle to ATS. |
@@ -801,7 +801,7 @@ core_transmit_notify (void *cls, size_t size, void *buf) | |||
801 | if (buf == NULL) | 801 | if (buf == NULL) |
802 | { | 802 | { |
803 | peer->th = | 803 | peer->th = |
804 | GNUNET_CORE_notify_transmit_ready (coreAPI, GNUNET_NO, | 804 | GNUNET_CORE_notify_transmit_ready (core_api, GNUNET_NO, |
805 | pending->importance, | 805 | pending->importance, |
806 | GNUNET_TIME_absolute_get_remaining | 806 | GNUNET_TIME_absolute_get_remaining |
807 | (pending->timeout), &peer->id, | 807 | (pending->timeout), &peer->id, |
@@ -827,7 +827,7 @@ core_transmit_notify (void *cls, size_t size, void *buf) | |||
827 | if (peer->head != NULL) | 827 | if (peer->head != NULL) |
828 | { | 828 | { |
829 | peer->th = | 829 | peer->th = |
830 | GNUNET_CORE_notify_transmit_ready (coreAPI, GNUNET_NO, | 830 | GNUNET_CORE_notify_transmit_ready (core_api, GNUNET_NO, |
831 | pending->importance, | 831 | pending->importance, |
832 | GNUNET_TIME_absolute_get_remaining | 832 | GNUNET_TIME_absolute_get_remaining |
833 | (pending->timeout), &peer->id, msize, | 833 | (pending->timeout), &peer->id, msize, |
@@ -857,7 +857,7 @@ process_peer_queue (struct PeerInfo *peer) | |||
857 | ("# Bytes of bandwidth requested from core"), | 857 | ("# Bytes of bandwidth requested from core"), |
858 | ntohs (pending->msg->size), GNUNET_NO); | 858 | ntohs (pending->msg->size), GNUNET_NO); |
859 | peer->th = | 859 | peer->th = |
860 | GNUNET_CORE_notify_transmit_ready (coreAPI, GNUNET_NO, | 860 | GNUNET_CORE_notify_transmit_ready (core_api, GNUNET_NO, |
861 | pending->importance, | 861 | pending->importance, |
862 | GNUNET_TIME_absolute_get_remaining | 862 | GNUNET_TIME_absolute_get_remaining |
863 | (pending->timeout), &peer->id, | 863 | (pending->timeout), &peer->id, |
@@ -2179,11 +2179,11 @@ GDS_NEIGHBOURS_init () | |||
2179 | log_route_details_stderr = | 2179 | log_route_details_stderr = |
2180 | (NULL != getenv("GNUNET_DHT_ROUTE_DEBUG")) ? GNUNET_YES : GNUNET_NO; | 2180 | (NULL != getenv("GNUNET_DHT_ROUTE_DEBUG")) ? GNUNET_YES : GNUNET_NO; |
2181 | atsAPI = GNUNET_ATS_performance_init (GDS_cfg, NULL, NULL); | 2181 | atsAPI = GNUNET_ATS_performance_init (GDS_cfg, NULL, NULL); |
2182 | coreAPI = | 2182 | core_api = |
2183 | GNUNET_CORE_connect (GDS_cfg, NULL, &core_init, &handle_core_connect, | 2183 | GNUNET_CORE_connect (GDS_cfg, NULL, &core_init, &handle_core_connect, |
2184 | &handle_core_disconnect, NULL, GNUNET_NO, NULL, | 2184 | &handle_core_disconnect, NULL, GNUNET_NO, NULL, |
2185 | GNUNET_NO, core_handlers); | 2185 | GNUNET_NO, core_handlers); |
2186 | if (coreAPI == NULL) | 2186 | if (core_api == NULL) |
2187 | return GNUNET_SYSERR; | 2187 | return GNUNET_SYSERR; |
2188 | all_known_peers = GNUNET_CONTAINER_multipeermap_create (256, GNUNET_NO); | 2188 | all_known_peers = GNUNET_CONTAINER_multipeermap_create (256, GNUNET_NO); |
2189 | return GNUNET_OK; | 2189 | return GNUNET_OK; |
@@ -2196,10 +2196,10 @@ GDS_NEIGHBOURS_init () | |||
2196 | void | 2196 | void |
2197 | GDS_NEIGHBOURS_done () | 2197 | GDS_NEIGHBOURS_done () |
2198 | { | 2198 | { |
2199 | if (NULL == coreAPI) | 2199 | if (NULL == core_api) |
2200 | return; | 2200 | return; |
2201 | GNUNET_CORE_disconnect (coreAPI); | 2201 | GNUNET_CORE_disconnect (core_api); |
2202 | coreAPI = NULL; | 2202 | core_api = NULL; |
2203 | GNUNET_ATS_performance_done (atsAPI); | 2203 | GNUNET_ATS_performance_done (atsAPI); |
2204 | atsAPI = NULL; | 2204 | atsAPI = NULL; |
2205 | GNUNET_assert (0 == GNUNET_CONTAINER_multipeermap_size (all_known_peers)); | 2205 | GNUNET_assert (0 == GNUNET_CONTAINER_multipeermap_size (all_known_peers)); |
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c index 6dff5b8c5..b69a4a7fe 100644 --- a/src/nse/gnunet-service-nse.c +++ b/src/nse/gnunet-service-nse.c | |||
@@ -216,7 +216,7 @@ static struct GNUNET_STATISTICS_Handle *stats; | |||
216 | /** | 216 | /** |
217 | * Handle to the core service. | 217 | * Handle to the core service. |
218 | */ | 218 | */ |
219 | static struct GNUNET_CORE_Handle *coreAPI; | 219 | static struct GNUNET_CORE_Handle *core_api; |
220 | 220 | ||
221 | /** | 221 | /** |
222 | * Map of all connected peers. | 222 | * Map of all connected peers. |
@@ -660,7 +660,7 @@ transmit_task_cb (void *cls, | |||
660 | 660 | ||
661 | GNUNET_assert (NULL == peer_entry->th); | 661 | GNUNET_assert (NULL == peer_entry->th); |
662 | peer_entry->th = | 662 | peer_entry->th = |
663 | GNUNET_CORE_notify_transmit_ready (coreAPI, GNUNET_NO, NSE_PRIORITY, | 663 | GNUNET_CORE_notify_transmit_ready (core_api, GNUNET_NO, NSE_PRIORITY, |
664 | GNUNET_TIME_UNIT_FOREVER_REL, | 664 | GNUNET_TIME_UNIT_FOREVER_REL, |
665 | &peer_entry->id, | 665 | &peer_entry->id, |
666 | sizeof (struct | 666 | sizeof (struct |
@@ -1324,10 +1324,10 @@ shutdown_task (void *cls, | |||
1324 | GNUNET_SERVER_notification_context_destroy (nc); | 1324 | GNUNET_SERVER_notification_context_destroy (nc); |
1325 | nc = NULL; | 1325 | nc = NULL; |
1326 | } | 1326 | } |
1327 | if (NULL != coreAPI) | 1327 | if (NULL != core_api) |
1328 | { | 1328 | { |
1329 | GNUNET_CORE_disconnect (coreAPI); | 1329 | GNUNET_CORE_disconnect (core_api); |
1330 | coreAPI = NULL; | 1330 | core_api = NULL; |
1331 | } | 1331 | } |
1332 | if (NULL != stats) | 1332 | if (NULL != stats) |
1333 | { | 1333 | { |
@@ -1503,7 +1503,7 @@ run (void *cls, | |||
1503 | GNUNET_SERVER_add_handlers (srv, handlers); | 1503 | GNUNET_SERVER_add_handlers (srv, handlers); |
1504 | nc = GNUNET_SERVER_notification_context_create (srv, 1); | 1504 | nc = GNUNET_SERVER_notification_context_create (srv, 1); |
1505 | /* Connect to core service and register core handlers */ | 1505 | /* Connect to core service and register core handlers */ |
1506 | coreAPI = GNUNET_CORE_connect (cfg, /* Main configuration */ | 1506 | core_api = GNUNET_CORE_connect (cfg, /* Main configuration */ |
1507 | NULL, /* Closure passed to functions */ | 1507 | NULL, /* Closure passed to functions */ |
1508 | &core_init, /* Call core_init once connected */ | 1508 | &core_init, /* Call core_init once connected */ |
1509 | &handle_core_connect, /* Handle connects */ | 1509 | &handle_core_connect, /* Handle connects */ |
@@ -1513,7 +1513,7 @@ run (void *cls, | |||
1513 | NULL, /* Don't want notified about all outbound messages */ | 1513 | NULL, /* Don't want notified about all outbound messages */ |
1514 | GNUNET_NO, /* For header only outbound notification */ | 1514 | GNUNET_NO, /* For header only outbound notification */ |
1515 | core_handlers); /* Register these handlers */ | 1515 | core_handlers); /* Register these handlers */ |
1516 | if (NULL == coreAPI) | 1516 | if (NULL == core_api) |
1517 | { | 1517 | { |
1518 | GNUNET_SCHEDULER_shutdown (); | 1518 | GNUNET_SCHEDULER_shutdown (); |
1519 | return; | 1519 | return; |
diff --git a/src/transport/plugin_transport_smtp.c b/src/transport/plugin_transport_smtp.c index c305578e0..fa0c787d1 100644 --- a/src/transport/plugin_transport_smtp.c +++ b/src/transport/plugin_transport_smtp.c | |||
@@ -95,7 +95,7 @@ GNUNET_NETWORK_STRUCT_END | |||
95 | /** | 95 | /** |
96 | * apis (our advertised API and the core api ) | 96 | * apis (our advertised API and the core api ) |
97 | */ | 97 | */ |
98 | static GNUNET_CoreAPIForTransport *coreAPI; | 98 | static GNUNET_CoreAPIForTransport *core_api; |
99 | 99 | ||
100 | static struct GNUNET_GE_Context *ectx; | 100 | static struct GNUNET_GE_Context *ectx; |
101 | 101 | ||
@@ -322,8 +322,8 @@ listenAndDistribute (void *unused) | |||
322 | if ( (retl == NULL) || (smtp_shutdown == GNUNET_YES)) {\ | 322 | if ( (retl == NULL) || (smtp_shutdown == GNUNET_YES)) {\ |
323 | goto END; \ | 323 | goto END; \ |
324 | }\ | 324 | }\ |
325 | if (coreAPI->load_monitor != NULL) \ | 325 | if (core_api->load_monitor != NULL) \ |
326 | GNUNET_network_monitor_notify_transmission(coreAPI->load_monitor, GNUNET_ND_DOWNLOAD, strlen(retl)); \ | 326 | GNUNET_network_monitor_notify_transmission(core_api->load_monitor, GNUNET_ND_DOWNLOAD, strlen(retl)); \ |
327 | } while (0) | 327 | } while (0) |
328 | 328 | ||
329 | 329 | ||
@@ -390,7 +390,7 @@ listenAndDistribute (void *unused) | |||
390 | "SMTP message passed to the core.\n"); | 390 | "SMTP message passed to the core.\n"); |
391 | #endif | 391 | #endif |
392 | 392 | ||
393 | coreAPI->receive (coreMP); | 393 | core_api->receive (coreMP); |
394 | } | 394 | } |
395 | END: | 395 | END: |
396 | #if DEBUG_SMTP | 396 | #if DEBUG_SMTP |
@@ -449,7 +449,7 @@ api_create_hello () | |||
449 | EmailAddress *haddr; | 449 | EmailAddress *haddr; |
450 | int i; | 450 | int i; |
451 | 451 | ||
452 | GNUNET_GC_get_configuration_value_string (coreAPI->cfg, "SMTP", "FILTER", | 452 | GNUNET_GC_get_configuration_value_string (core_api->cfg, "SMTP", "FILTER", |
453 | "X-mailer: GNUnet", &filter); | 453 | "X-mailer: GNUnet", &filter); |
454 | if (NULL == strstr (filter, ": ")) | 454 | if (NULL == strstr (filter, ": ")) |
455 | { | 455 | { |
@@ -614,7 +614,7 @@ api_send (GNUNET_TSession * tsession, const void *msg, const unsigned int size, | |||
614 | mp = (SMTPMessage *) &m[size]; | 614 | mp = (SMTPMessage *) &m[size]; |
615 | mp->header.size = htons (size + sizeof (SMTPMessage)); | 615 | mp->header.size = htons (size + sizeof (SMTPMessage)); |
616 | mp->header.type = htons (0); | 616 | mp->header.type = htons (0); |
617 | mp->sender = *coreAPI->my_identity; | 617 | mp->sender = *core_api->my_identity; |
618 | gm_cls.ebody = NULL; | 618 | gm_cls.ebody = NULL; |
619 | gm_cls.pos = 0; | 619 | gm_cls.pos = 0; |
620 | gm_cls.esize = base64_encode (m, size + sizeof (SMTPMessage), &gm_cls.ebody); | 620 | gm_cls.esize = base64_encode (m, size + sizeof (SMTPMessage), &gm_cls.ebody); |
@@ -665,8 +665,8 @@ api_send (GNUNET_TSession * tsession, const void *msg, const unsigned int size, | |||
665 | } | 665 | } |
666 | if (stats != NULL) | 666 | if (stats != NULL) |
667 | stats->change (stat_bytesSent, size); | 667 | stats->change (stat_bytesSent, size); |
668 | if (coreAPI->load_monitor != NULL) | 668 | if (core_api->load_monitor != NULL) |
669 | GNUNET_network_monitor_notify_transmission (coreAPI->load_monitor, | 669 | GNUNET_network_monitor_notify_transmission (core_api->load_monitor, |
670 | GNUNET_ND_UPLOAD, gm_cls.esize); | 670 | GNUNET_ND_UPLOAD, gm_cls.esize); |
671 | smtp_message_reset_status (message); /* this is needed to plug a 28-byte/message memory leak in libesmtp */ | 671 | smtp_message_reset_status (message); /* this is needed to plug a 28-byte/message memory leak in libesmtp */ |
672 | smtp_destroy_session (session); | 672 | smtp_destroy_session (session); |
@@ -790,21 +790,21 @@ inittransport_smtp (struct GNUNET_CoreAPIForTransport * core) | |||
790 | unsigned long long mtu; | 790 | unsigned long long mtu; |
791 | struct sigaction sa; | 791 | struct sigaction sa; |
792 | 792 | ||
793 | coreAPI = core; | 793 | core_api = core; |
794 | ectx = core->ectx; | 794 | ectx = core->ectx; |
795 | if (!GNUNET_GC_have_configuration_value (coreAPI->cfg, "SMTP", "EMAIL")) | 795 | if (!GNUNET_GC_have_configuration_value (core_api->cfg, "SMTP", "EMAIL")) |
796 | { | 796 | { |
797 | GNUNET_GE_LOG (ectx, GNUNET_GE_ERROR | GNUNET_GE_BULK | GNUNET_GE_USER, | 797 | GNUNET_GE_LOG (ectx, GNUNET_GE_ERROR | GNUNET_GE_BULK | GNUNET_GE_USER, |
798 | _ | 798 | _ |
799 | ("No email-address specified, can not start SMTP transport.\n")); | 799 | ("No email-address specified, can not start SMTP transport.\n")); |
800 | return NULL; | 800 | return NULL; |
801 | } | 801 | } |
802 | GNUNET_GC_get_configuration_value_number (coreAPI->cfg, "SMTP", "MTU", 1200, | 802 | GNUNET_GC_get_configuration_value_number (core_api->cfg, "SMTP", "MTU", 1200, |
803 | SMTP_MESSAGE_SIZE, | 803 | SMTP_MESSAGE_SIZE, |
804 | SMTP_MESSAGE_SIZE, &mtu); | 804 | SMTP_MESSAGE_SIZE, &mtu); |
805 | GNUNET_GC_get_configuration_value_number (coreAPI->cfg, "SMTP", "RATELIMIT", | 805 | GNUNET_GC_get_configuration_value_number (core_api->cfg, "SMTP", "RATELIMIT", |
806 | 0, 0, 1024 * 1024, &rate_limit); | 806 | 0, 0, 1024 * 1024, &rate_limit); |
807 | stats = coreAPI->service_request ("stats"); | 807 | stats = core_api->service_request ("stats"); |
808 | if (stats != NULL) | 808 | if (stats != NULL) |
809 | { | 809 | { |
810 | stat_bytesReceived = | 810 | stat_bytesReceived = |
@@ -813,7 +813,7 @@ inittransport_smtp (struct GNUNET_CoreAPIForTransport * core) | |||
813 | stat_bytesDropped = | 813 | stat_bytesDropped = |
814 | stats->create (gettext_noop ("# bytes dropped by SMTP (outgoing)")); | 814 | stats->create (gettext_noop ("# bytes dropped by SMTP (outgoing)")); |
815 | } | 815 | } |
816 | GNUNET_GC_get_configuration_value_filename (coreAPI->cfg, "SMTP", "PIPE", &pipename); | 816 | GNUNET_GC_get_configuration_value_filename (core_api->cfg, "SMTP", "PIPE", &pipename); |
817 | UNLINK (pipename); | 817 | UNLINK (pipename); |
818 | if (0 != mkfifo (pipename, S_IWUSR | S_IRUSR | S_IWGRP | S_IWOTH)) | 818 | if (0 != mkfifo (pipename, S_IWUSR | S_IRUSR | S_IWGRP | S_IWOTH)) |
819 | { | 819 | { |
@@ -821,7 +821,7 @@ inittransport_smtp (struct GNUNET_CoreAPIForTransport * core) | |||
821 | GNUNET_GE_ADMIN | GNUNET_GE_BULK | GNUNET_GE_FATAL, | 821 | GNUNET_GE_ADMIN | GNUNET_GE_BULK | GNUNET_GE_FATAL, |
822 | "mkfifo"); | 822 | "mkfifo"); |
823 | GNUNET_free (pipename); | 823 | GNUNET_free (pipename); |
824 | coreAPI->service_release (stats); | 824 | core_api->service_release (stats); |
825 | stats = NULL; | 825 | stats = NULL; |
826 | return NULL; | 826 | return NULL; |
827 | } | 827 | } |
@@ -831,10 +831,10 @@ inittransport_smtp (struct GNUNET_CoreAPIForTransport * core) | |||
831 | GNUNET_GE_LOG_STRERROR (ectx, | 831 | GNUNET_GE_LOG_STRERROR (ectx, |
832 | GNUNET_GE_ADMIN | GNUNET_GE_BULK | | 832 | GNUNET_GE_ADMIN | GNUNET_GE_BULK | |
833 | GNUNET_GE_WARNING, "chmod"); | 833 | GNUNET_GE_WARNING, "chmod"); |
834 | GNUNET_GC_get_configuration_value_string (coreAPI->cfg, "SMTP", "EMAIL", NULL, | 834 | GNUNET_GC_get_configuration_value_string (core_api->cfg, "SMTP", "EMAIL", NULL, |
835 | &email); | 835 | &email); |
836 | lock = GNUNET_mutex_create (GNUNET_NO); | 836 | lock = GNUNET_mutex_create (GNUNET_NO); |
837 | GNUNET_GC_get_configuration_value_string (coreAPI->cfg, "SMTP", "SERVER", | 837 | GNUNET_GC_get_configuration_value_string (core_api->cfg, "SMTP", "SERVER", |
838 | "localhost:25", &smtp_server_name); | 838 | "localhost:25", &smtp_server_name); |
839 | sa.sa_handler = SIG_IGN; | 839 | sa.sa_handler = SIG_IGN; |
840 | sigemptyset (&sa.sa_mask); | 840 | sigemptyset (&sa.sa_mask); |
@@ -864,7 +864,7 @@ donetransport_smtp () | |||
864 | GNUNET_free (smtp_server_name); | 864 | GNUNET_free (smtp_server_name); |
865 | if (stats != NULL) | 865 | if (stats != NULL) |
866 | { | 866 | { |
867 | coreAPI->service_release (stats); | 867 | core_api->service_release (stats); |
868 | stats = NULL; | 868 | stats = NULL; |
869 | } | 869 | } |
870 | GNUNET_mutex_destroy (lock); | 870 | GNUNET_mutex_destroy (lock); |