aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-06 09:00:14 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-06 09:00:14 +0000
commit170d5baeece2def099112c6a25287a95d2b28899 (patch)
tree5950b36e6c5fa5fe6b90c8c3efc68dcce50d931d /src
parentd9c8e8f14e77670c657ae42030ff3581ad060968 (diff)
downloadgnunet-170d5baeece2def099112c6a25287a95d2b28899.tar.gz
gnunet-170d5baeece2def099112c6a25287a95d2b28899.zip
-use only one nc per client
Diffstat (limited to 'src')
-rw-r--r--src/ats/gnunet-service-ats_addresses.c18
-rw-r--r--src/ats/gnunet-service-ats_performance.c32
-rw-r--r--src/ats/gnunet-service-ats_reservations.c20
-rw-r--r--src/ats/gnunet-service-ats_scheduling.c5
-rw-r--r--src/ats/test_ats_api_performance_list_all_addresses.c52
-rw-r--r--src/include/gnunet_ats_service.h6
-rw-r--r--src/util/server_nc.c8
7 files changed, 82 insertions, 59 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c
index 5715bfbbd..0c896e489 100644
--- a/src/ats/gnunet-service-ats_addresses.c
+++ b/src/ats/gnunet-service-ats_addresses.c
@@ -215,11 +215,6 @@
215 */ 215 */
216struct GNUNET_CONTAINER_MultiPeerMap *GSA_addresses; 216struct GNUNET_CONTAINER_MultiPeerMap *GSA_addresses;
217 217
218/**
219 * Context for sending messages to performance clients without PIC.
220 */
221static struct GNUNET_SERVER_NotificationContext *nc;
222
223 218
224/** 219/**
225 * Update statistic on number of addresses. 220 * Update statistic on number of addresses.
@@ -698,7 +693,6 @@ GAS_addresses_init (struct GNUNET_SERVER_Handle *server)
698{ 693{
699 GSA_addresses = GNUNET_CONTAINER_multipeermap_create (128, GNUNET_NO); 694 GSA_addresses = GNUNET_CONTAINER_multipeermap_create (128, GNUNET_NO);
700 update_addresses_stat (); 695 update_addresses_stat ();
701 nc = GNUNET_SERVER_notification_context_create (server, 32);
702} 696}
703 697
704 698
@@ -749,8 +743,6 @@ GAS_addresses_done ()
749 GAS_addresses_destroy_all (); 743 GAS_addresses_destroy_all ();
750 GNUNET_CONTAINER_multipeermap_destroy (GSA_addresses); 744 GNUNET_CONTAINER_multipeermap_destroy (GSA_addresses);
751 GSA_addresses = NULL; 745 GSA_addresses = NULL;
752 GNUNET_SERVER_notification_context_destroy (nc);
753 nc = NULL;
754} 746}
755 747
756 748
@@ -902,6 +894,7 @@ transmit_req_addr (struct AddressIteration *ai,
902 char *addrp; 894 char *addrp;
903 size_t plugin_name_length; 895 size_t plugin_name_length;
904 size_t msize; 896 size_t msize;
897 struct GNUNET_SERVER_NotificationContext *nc;
905 898
906 if (NULL != plugin_name) 899 if (NULL != plugin_name)
907 plugin_name_length = strlen (plugin_name) + 1; 900 plugin_name_length = strlen (plugin_name) + 1;
@@ -937,6 +930,13 @@ transmit_req_addr (struct AddressIteration *ai,
937 memcpy (addrp, plugin_addr, plugin_addr_len); 930 memcpy (addrp, plugin_addr, plugin_addr_len);
938 if (NULL != plugin_name) 931 if (NULL != plugin_name)
939 strcpy (&addrp[plugin_addr_len], plugin_name); 932 strcpy (&addrp[plugin_addr_len], plugin_name);
933 nc = *GNUNET_SERVER_client_get_user_context (ai->client,
934 struct GNUNET_SERVER_NotificationContext *);
935 if (NULL == nc)
936 {
937 GNUNET_break (0);
938 return;
939 }
940 GNUNET_SERVER_notification_context_unicast (nc, 940 GNUNET_SERVER_notification_context_unicast (nc,
941 ai->client, 941 ai->client,
942 &msg->header, 942 &msg->header,
@@ -1021,8 +1021,6 @@ GAS_handle_request_address_list (void *cls,
1021 const struct AddressListRequestMessage *alrm; 1021 const struct AddressListRequestMessage *alrm;
1022 struct GNUNET_PeerIdentity allzeros; 1022 struct GNUNET_PeerIdentity allzeros;
1023 1023
1024 GNUNET_SERVER_notification_context_add (nc,
1025 client);
1026 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1024 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1027 "Received ADDRESSLIST_REQUEST message\n"); 1025 "Received ADDRESSLIST_REQUEST message\n");
1028 alrm = (const struct AddressListRequestMessage *) message; 1026 alrm = (const struct AddressListRequestMessage *) message;
diff --git a/src/ats/gnunet-service-ats_performance.c b/src/ats/gnunet-service-ats_performance.c
index 9237b0711..e87cf3f6d 100644
--- a/src/ats/gnunet-service-ats_performance.c
+++ b/src/ats/gnunet-service-ats_performance.c
@@ -33,7 +33,7 @@
33/** 33/**
34 * Context for sending messages to performance clients without PIC. 34 * Context for sending messages to performance clients without PIC.
35 */ 35 */
36static struct GNUNET_SERVER_NotificationContext *nc; 36static struct GNUNET_SERVER_NotificationContext *nc_no_pic;
37 37
38/** 38/**
39 * Context for sending messages to performance clients with PIC. 39 * Context for sending messages to performance clients with PIC.
@@ -79,6 +79,7 @@ notify_client (struct GNUNET_SERVER_Client *client,
79 plugin_name_length; 79 plugin_name_length;
80 char buf[msize] GNUNET_ALIGN; 80 char buf[msize] GNUNET_ALIGN;
81 struct GNUNET_ATS_Information *atsp; 81 struct GNUNET_ATS_Information *atsp;
82 struct GNUNET_SERVER_NotificationContext *nc;
82 char *addrp; 83 char *addrp;
83 84
84 GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE); 85 GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE);
@@ -109,6 +110,13 @@ notify_client (struct GNUNET_SERVER_Client *client,
109 } 110 }
110 else 111 else
111 { 112 {
113 nc = *GNUNET_SERVER_client_get_user_context (client,
114 struct GNUNET_SERVER_NotificationContext *);
115 if (NULL == nc)
116 {
117 GNUNET_break (0);
118 return;
119 }
112 GNUNET_SERVER_notification_context_unicast (nc, 120 GNUNET_SERVER_notification_context_unicast (nc,
113 client, 121 client,
114 &msg->header, 122 &msg->header,
@@ -223,15 +231,19 @@ GAS_performance_add_client (struct GNUNET_SERVER_Client *client,
223 { 231 {
224 GNUNET_SERVER_notification_context_add (nc_pic, 232 GNUNET_SERVER_notification_context_add (nc_pic,
225 client); 233 client);
226 GNUNET_SERVER_notification_context_add (nc, 234 GNUNET_SERVER_client_set_user_context (client,
227 client); 235 &nc_pic);
236 GAS_addresses_get_peer_info (NULL,
237 &peerinfo_it,
238 client);
228 } 239 }
229 else 240 else
230 GNUNET_SERVER_notification_context_add (nc, 241 {
242 GNUNET_SERVER_notification_context_add (nc_no_pic,
231 client); 243 client);
232 GAS_addresses_get_peer_info (NULL, 244 GNUNET_SERVER_client_set_user_context (client,
233 &peerinfo_it, 245 &nc_no_pic);
234 client); 246 }
235} 247}
236 248
237 249
@@ -243,7 +255,7 @@ GAS_performance_add_client (struct GNUNET_SERVER_Client *client,
243void 255void
244GAS_performance_init (struct GNUNET_SERVER_Handle *server) 256GAS_performance_init (struct GNUNET_SERVER_Handle *server)
245{ 257{
246 nc = GNUNET_SERVER_notification_context_create (server, 32); 258 nc_no_pic = GNUNET_SERVER_notification_context_create (server, 32);
247 nc_pic = GNUNET_SERVER_notification_context_create (server, 32); 259 nc_pic = GNUNET_SERVER_notification_context_create (server, 32);
248} 260}
249 261
@@ -254,8 +266,8 @@ GAS_performance_init (struct GNUNET_SERVER_Handle *server)
254void 266void
255GAS_performance_done () 267GAS_performance_done ()
256{ 268{
257 GNUNET_SERVER_notification_context_destroy (nc); 269 GNUNET_SERVER_notification_context_destroy (nc_no_pic);
258 nc = NULL; 270 nc_no_pic = NULL;
259 GNUNET_SERVER_notification_context_destroy (nc_pic); 271 GNUNET_SERVER_notification_context_destroy (nc_pic);
260 nc_pic = NULL; 272 nc_pic = NULL;
261} 273}
diff --git a/src/ats/gnunet-service-ats_reservations.c b/src/ats/gnunet-service-ats_reservations.c
index 2f3c1f5f1..b7e1984e5 100644
--- a/src/ats/gnunet-service-ats_reservations.c
+++ b/src/ats/gnunet-service-ats_reservations.c
@@ -39,11 +39,6 @@
39 */ 39 */
40static struct GNUNET_CONTAINER_MultiPeerMap *trackers; 40static struct GNUNET_CONTAINER_MultiPeerMap *trackers;
41 41
42/**
43 * Context for sending messages to performance clients without PIC.
44 */
45static struct GNUNET_SERVER_NotificationContext *nc;
46
47 42
48/** 43/**
49 * Reserve the given amount of incoming bandwidth (in bytes) from the 44 * Reserve the given amount of incoming bandwidth (in bytes) from the
@@ -142,11 +137,17 @@ GAS_handle_reservation_request (void *cls,
142 struct ReservationResultMessage result; 137 struct ReservationResultMessage result;
143 int32_t amount; 138 int32_t amount;
144 struct GNUNET_TIME_Relative res_delay; 139 struct GNUNET_TIME_Relative res_delay;
140 struct GNUNET_SERVER_NotificationContext *nc;
145 141
146 GNUNET_SERVER_notification_context_add (nc,
147 client);
148 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 142 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
149 "Received RESERVATION_REQUEST message\n"); 143 "Received RESERVATION_REQUEST message\n");
144 nc = *GNUNET_SERVER_client_get_user_context (client,
145 struct GNUNET_SERVER_NotificationContext *);
146 if (NULL == nc)
147 {
148 GNUNET_break (0);
149 return;
150 }
150 amount = (int32_t) ntohl (msg->amount); 151 amount = (int32_t) ntohl (msg->amount);
151 res_delay = GAS_reservations_reserve (&msg->peer, amount); 152 res_delay = GAS_reservations_reserve (&msg->peer, amount);
152 if (res_delay.rel_value_us > 0) 153 if (res_delay.rel_value_us > 0)
@@ -160,6 +161,7 @@ GAS_handle_reservation_request (void *cls,
160 "# reservation requests processed", 161 "# reservation requests processed",
161 1, 162 1,
162 GNUNET_NO); 163 GNUNET_NO);
164
163 GNUNET_SERVER_notification_context_unicast (nc, 165 GNUNET_SERVER_notification_context_unicast (nc,
164 client, 166 client,
165 &result.header, 167 &result.header,
@@ -178,7 +180,6 @@ void
178GAS_reservations_init (struct GNUNET_SERVER_Handle *server) 180GAS_reservations_init (struct GNUNET_SERVER_Handle *server)
179{ 181{
180 trackers = GNUNET_CONTAINER_multipeermap_create (128, GNUNET_NO); 182 trackers = GNUNET_CONTAINER_multipeermap_create (128, GNUNET_NO);
181 nc = GNUNET_SERVER_notification_context_create (server, 128);
182} 183}
183 184
184 185
@@ -211,9 +212,6 @@ GAS_reservations_done ()
211 &free_tracker, 212 &free_tracker,
212 NULL); 213 NULL);
213 GNUNET_CONTAINER_multipeermap_destroy (trackers); 214 GNUNET_CONTAINER_multipeermap_destroy (trackers);
214 GNUNET_SERVER_notification_context_destroy (nc);
215 nc = NULL;
216
217} 215}
218 216
219/* end of gnunet-service-ats_reservations.c */ 217/* end of gnunet-service-ats_reservations.c */
diff --git a/src/ats/gnunet-service-ats_scheduling.c b/src/ats/gnunet-service-ats_scheduling.c
index 59ac1be93..6c3bdfbf8 100644
--- a/src/ats/gnunet-service-ats_scheduling.c
+++ b/src/ats/gnunet-service-ats_scheduling.c
@@ -57,7 +57,10 @@ GAS_scheduling_add_client (struct GNUNET_SERVER_Client *client)
57 return GNUNET_SYSERR; 57 return GNUNET_SYSERR;
58 } 58 }
59 my_client = client; 59 my_client = client;
60 GNUNET_SERVER_notification_context_add (nc, client); 60 GNUNET_SERVER_notification_context_add (nc,
61 client);
62 GNUNET_SERVER_client_set_user_context (client,
63 &nc);
61 return GNUNET_OK; 64 return GNUNET_OK;
62} 65}
63 66
diff --git a/src/ats/test_ats_api_performance_list_all_addresses.c b/src/ats/test_ats_api_performance_list_all_addresses.c
index 714134321..ddfaefd2d 100644
--- a/src/ats/test_ats_api_performance_list_all_addresses.c
+++ b/src/ats/test_ats_api_performance_list_all_addresses.c
@@ -95,15 +95,16 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
95 95
96static void 96static void
97ats_perf_cb (void *cls, 97ats_perf_cb (void *cls,
98 const struct GNUNET_HELLO_Address *address, 98 const struct GNUNET_HELLO_Address *address,
99 int address_active, 99 int address_active,
100 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, 100 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
101 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 101 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
102 const struct GNUNET_ATS_Information *ats, 102 const struct GNUNET_ATS_Information *ats,
103 uint32_t ats_count) 103 uint32_t ats_count)
104{ 104{
105 static int counter = 0; 105 static int counter = 0;
106 106
107 fprintf (stderr, "HERE!\n");
107 if (NULL == address) 108 if (NULL == address)
108 { 109 {
109 phal = 0; 110 phal = 0;
@@ -115,11 +116,11 @@ ats_perf_cb (void *cls,
115 else 116 else
116 { 117 {
117 GNUNET_break (0); 118 GNUNET_break (0);
118 GNUNET_SCHEDULER_add_now (end_badly, NULL); 119 GNUNET_SCHEDULER_shutdown ();
119 } 120 }
120 return; 121 return;
121 } 122 }
122 counter ++; 123 counter++;
123} 124}
124 125
125 126
@@ -129,23 +130,28 @@ stat_cb(void *cls, const char *subsystem,
129 int is_persistent) 130 int is_persistent)
130{ 131{
131 132
132 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "ATS statistics: `%s' `%s' %llu\n", 133 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
133 subsystem,name, value); 134 "ATS statistics: `%s' `%s' %llu\n",
135 subsystem,name, value);
134 if (4 == value) 136 if (4 == value)
135 { 137 {
136 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 138 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
137 "All addresses added, connecting to performance\n"); 139 "All addresses added, connecting to performance\n");
138 if (NULL == (perf_ats = GNUNET_ATS_performance_init (cfg, NULL, NULL))) 140 if (NULL == (perf_ats = GNUNET_ATS_performance_init (cfg, NULL, NULL)))
139 { 141 {
140 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 142 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
141 "Failed to connect to performance API\n"); 143 "Failed to connect to performance API\n");
142 GNUNET_SCHEDULER_add_now (end_badly, NULL); 144 GNUNET_SCHEDULER_add_now (end_badly, NULL);
143 } 145 }
144 phal = GNUNET_ATS_performance_list_addresses (perf_ats, NULL, GNUNET_YES, &ats_perf_cb, NULL); 146 phal = GNUNET_ATS_performance_list_addresses (perf_ats,
147 NULL,
148 GNUNET_YES,
149 &ats_perf_cb, NULL);
145 } 150 }
146 return GNUNET_OK; 151 return GNUNET_OK;
147} 152}
148 153
154
149static void 155static void
150address_suggest_cb (void *cls, 156address_suggest_cb (void *cls,
151 const struct GNUNET_PeerIdentity *peer, 157 const struct GNUNET_PeerIdentity *peer,
@@ -154,7 +160,8 @@ address_suggest_cb (void *cls,
154 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, 160 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
155 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) 161 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in)
156{ 162{
157 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Did not expect suggestion callback!\n"); 163 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
164 "Did not expect suggestion callback!\n");
158 GNUNET_SCHEDULER_add_now (&end_badly, NULL); 165 GNUNET_SCHEDULER_add_now (&end_badly, NULL);
159} 166}
160 167
@@ -171,7 +178,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
171static void 178static void
172end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 179end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
173{ 180{
174 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Shutting down\n"); 181 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
182 "Shutting down\n");
175 if (die_task != NULL ) 183 if (die_task != NULL )
176 { 184 {
177 GNUNET_SCHEDULER_cancel (die_task); 185 GNUNET_SCHEDULER_cancel (die_task);
@@ -213,10 +221,10 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
213} 221}
214 222
215 223
216
217static void 224static void
218run (void *cls, const struct GNUNET_CONFIGURATION_Handle *mycfg, 225run (void *cls,
219 struct GNUNET_TESTING_Peer *peer) 226 const struct GNUNET_CONFIGURATION_Handle *mycfg,
227 struct GNUNET_TESTING_Peer *peer)
220{ 228{
221 ret = 1; 229 ret = 1;
222 cfg = (struct GNUNET_CONFIGURATION_Handle *) mycfg; 230 cfg = (struct GNUNET_CONFIGURATION_Handle *) mycfg;
@@ -271,11 +279,13 @@ run (void *cls, const struct GNUNET_CONFIGURATION_Handle *mycfg,
271 p1_ha[1].peer = p[1].id; 279 p1_ha[1].peer = p[1].id;
272 p1_ha[1].transport_name = p1_addresses[1].plugin; 280 p1_ha[1].transport_name = p1_addresses[1].plugin;
273 281
274 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Created peer 1: `%s'\n", 282 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
275 GNUNET_i2s (&p[1].id)); 283 "Created peer 1: `%s'\n",
284 GNUNET_i2s (&p[1].id));
276 285
277 /* Add addresses */ 286 /* Add addresses */
278 sched_ats = GNUNET_ATS_scheduling_init (cfg, &address_suggest_cb, NULL ); 287 sched_ats = GNUNET_ATS_scheduling_init (cfg,
288 &address_suggest_cb, NULL);
279 if (sched_ats == NULL ) 289 if (sched_ats == NULL )
280 { 290 {
281 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not setup peer!\n"); 291 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Could not setup peer!\n");
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h
index 8c3c5361e..63c560487 100644
--- a/src/include/gnunet_ats_service.h
+++ b/src/include/gnunet_ats_service.h
@@ -638,7 +638,7 @@ GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
638 * 638 *
639 * @param handle the performance handle to use 639 * @param handle the performance handle to use
640 * @param peer peer idm can be NULL for all peers 640 * @param peer peer idm can be NULL for all peers
641 * @param all GNUNET_YES to get information about all addresses or GNUNET_NO to 641 * @param all #GNUNET_YES to get information about all addresses or #GNUNET_NO to
642 * get only address currently used 642 * get only address currently used
643 * @param infocb callback to call with the addresses, 643 * @param infocb callback to call with the addresses,
644 * will callback with address == NULL when done 644 * will callback with address == NULL when done
@@ -683,7 +683,7 @@ GNUNET_ATS_performance_done (struct GNUNET_ATS_PerformanceHandle *ph);
683 */ 683 */
684typedef void 684typedef void
685(*GNUNET_ATS_ReservationCallback) (void *cls, 685(*GNUNET_ATS_ReservationCallback) (void *cls,
686 const struct GNUNET_PeerIdentity * peer, 686 const struct GNUNET_PeerIdentity *peer,
687 int32_t amount, 687 int32_t amount,
688 struct GNUNET_TIME_Relative res_delay); 688 struct GNUNET_TIME_Relative res_delay);
689 689
@@ -710,7 +710,7 @@ struct GNUNET_ATS_ReservationContext;
710 */ 710 */
711struct GNUNET_ATS_ReservationContext * 711struct GNUNET_ATS_ReservationContext *
712GNUNET_ATS_reserve_bandwidth (struct GNUNET_ATS_PerformanceHandle *ph, 712GNUNET_ATS_reserve_bandwidth (struct GNUNET_ATS_PerformanceHandle *ph,
713 const struct GNUNET_PeerIdentity *peer, 713 const struct GNUNET_PeerIdentity *peer,
714 int32_t amount, 714 int32_t amount,
715 GNUNET_ATS_ReservationCallback rcb, 715 GNUNET_ATS_ReservationCallback rcb,
716 void *rcb_cls); 716 void *rcb_cls);
diff --git a/src/util/server_nc.c b/src/util/server_nc.c
index 4e54cf464..6e8f8ccdf 100644
--- a/src/util/server_nc.c
+++ b/src/util/server_nc.c
@@ -211,7 +211,9 @@ GNUNET_SERVER_notification_context_create (struct GNUNET_SERVER_Handle *server,
211 ret = GNUNET_new (struct GNUNET_SERVER_NotificationContext); 211 ret = GNUNET_new (struct GNUNET_SERVER_NotificationContext);
212 ret->server = server; 212 ret->server = server;
213 ret->queue_length = queue_length; 213 ret->queue_length = queue_length;
214 GNUNET_SERVER_disconnect_notify (server, &handle_client_disconnect, ret); 214 GNUNET_SERVER_disconnect_notify (server,
215 &handle_client_disconnect,
216 ret);
215 return ret; 217 return ret;
216} 218}
217 219
@@ -234,7 +236,7 @@ GNUNET_SERVER_notification_context_destroy (struct GNUNET_SERVER_NotificationCon
234 pos); 236 pos);
235 if (NULL != pos->th) 237 if (NULL != pos->th)
236 { 238 {
237 GNUNET_SERVER_notify_transmit_ready_cancel(pos->th); 239 GNUNET_SERVER_notify_transmit_ready_cancel (pos->th);
238 pos->th = NULL; 240 pos->th = NULL;
239 } 241 }
240 GNUNET_SERVER_client_drop (pos->client); 242 GNUNET_SERVER_client_drop (pos->client);
@@ -307,7 +309,7 @@ transmit_message (void *cls,
307 if (NULL == buf) 309 if (NULL == buf)
308 { 310 {
309 /* 'cl' should be freed via disconnect notification shortly */ 311 /* 'cl' should be freed via disconnect notification shortly */
310 LOG (GNUNET_ERROR_TYPE_DEBUG, 312 LOG (GNUNET_ERROR_TYPE_WARNING,
311 "Failed to transmit message from NC queue to client\n"); 313 "Failed to transmit message from NC queue to client\n");
312 return 0; 314 return 0;
313 } 315 }