aboutsummaryrefslogtreecommitdiff
path: root/src/cadet
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-10-02 03:37:23 +0000
committerBart Polot <bart@net.in.tum.de>2015-10-02 03:37:23 +0000
commitd638e1be03a2710eb980edb17a12bc2f16e76e26 (patch)
tree5755f20aa11c414a49b63d6d8d3a91eb509d531d /src/cadet
parenta8d8b1c062b3a70b14fb46d34fc029a89a6e42e6 (diff)
downloadgnunet-d638e1be03a2710eb980edb17a12bc2f16e76e26.tar.gz
gnunet-d638e1be03a2710eb980edb17a12bc2f16e76e26.zip
- unify logging format
Diffstat (limited to 'src/cadet')
-rw-r--r--src/cadet/cadet_common.c72
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c16
-rw-r--r--src/cadet/gnunet-service-cadet_peer.c26
3 files changed, 56 insertions, 58 deletions
diff --git a/src/cadet/cadet_common.c b/src/cadet/cadet_common.c
index 7df22b396..8ac85fe17 100644
--- a/src/cadet/cadet_common.c
+++ b/src/cadet/cadet_common.c
@@ -105,7 +105,7 @@ GC_m2s (uint16_t m)
105{ 105{
106 static char buf[2][16]; 106 static char buf[2][16];
107 static int idx; 107 static int idx;
108 const char *t; 108 const char *s;
109 109
110 idx = (idx + 1) % 2; 110 idx = (idx + 1) % 2;
111 switch (m) 111 switch (m)
@@ -120,238 +120,238 @@ GC_m2s (uint16_t m)
120 * Request the creation of a path 120 * Request the creation of a path
121 */ 121 */
122 case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE: 122 case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE:
123 t = "CONN_CREATE"; 123 s = "CONN_CREAT";
124 break; 124 break;
125 125
126 /** 126 /**
127 * Request the modification of an existing path 127 * Request the modification of an existing path
128 */ 128 */
129 case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK: 129 case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK:
130 t = "CONN_ACK"; 130 s = "CONN_ACK";
131 break; 131 break;
132 132
133 /** 133 /**
134 * Notify that a connection of a path is no longer valid 134 * Notify that a connection of a path is no longer valid
135 */ 135 */
136 case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN: 136 case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN:
137 t = "CONN_BROKEN"; 137 s = "CONN_BRKN";
138 break; 138 break;
139 139
140 /** 140 /**
141 * At some point, the route will spontaneously change 141 * At some point, the route will spontaneously change
142 */ 142 */
143 case GNUNET_MESSAGE_TYPE_CADET_PATH_CHANGED: 143 case GNUNET_MESSAGE_TYPE_CADET_PATH_CHANGED:
144 t = "PATH_CHANGED"; 144 s = "PATH_CHNGD";
145 break; 145 break;
146 146
147 /** 147 /**
148 * Transport payload data. 148 * Transport payload data.
149 */ 149 */
150 case GNUNET_MESSAGE_TYPE_CADET_DATA: 150 case GNUNET_MESSAGE_TYPE_CADET_DATA:
151 t = "DATA"; 151 s = "DATA";
152 break; 152 break;
153 153
154 /** 154 /**
155 * Confirm receipt of payload data. 155 * Confirm receipt of payload data.
156 */ 156 */
157 case GNUNET_MESSAGE_TYPE_CADET_DATA_ACK: 157 case GNUNET_MESSAGE_TYPE_CADET_DATA_ACK:
158 t = "DATA_ACK"; 158 s = "DATA_ACK";
159 break; 159 break;
160 160
161 /** 161 /**
162 * Key exchange encapsulation. 162 * Key exchange encapsulation.
163 */ 163 */
164 case GNUNET_MESSAGE_TYPE_CADET_KX: 164 case GNUNET_MESSAGE_TYPE_CADET_KX:
165 t = "KX"; 165 s = "KX";
166 break; 166 break;
167 167
168 /** 168 /**
169 * Axolotl key exchange message. 169 * Axolotl key exchange message.
170 */ 170 */
171 case GNUNET_MESSAGE_TYPE_CADET_AX_KX: 171 case GNUNET_MESSAGE_TYPE_CADET_AX_KX:
172 t = "AX_KX"; 172 s = "AX_KX";
173 break; 173 break;
174 174
175 /** 175 /**
176 * New ephemeral key. 176 * New ephemeral key.
177 */ 177 */
178 case GNUNET_MESSAGE_TYPE_CADET_KX_EPHEMERAL: 178 case GNUNET_MESSAGE_TYPE_CADET_KX_EPHEMERAL:
179 t = "KX_EPHEMERAL"; 179 s = "KX_EPHM";
180 break; 180 break;
181 181
182 /** 182 /**
183 * Answer to session key challenge. 183 * Answer to session key challenge.
184 */ 184 */
185 case GNUNET_MESSAGE_TYPE_CADET_KX_PONG: 185 case GNUNET_MESSAGE_TYPE_CADET_KX_PONG:
186 t = "KX_PONG"; 186 s = "KX_PONG";
187 break; 187 break;
188 188
189 /** 189 /**
190 * Request the destuction of a path 190 * Request the destuction of a path
191 */ 191 */
192 case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY: 192 case GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY:
193 t = "CONN_DESTROY"; 193 s = "CONN_DSTRY";
194 break; 194 break;
195 195
196 /** 196 /**
197 * ACK for a data packet. 197 * ACK for a data packet.
198 */ 198 */
199 case GNUNET_MESSAGE_TYPE_CADET_ACK: 199 case GNUNET_MESSAGE_TYPE_CADET_ACK:
200 t = "ACK"; 200 s = "ACK";
201 break; 201 break;
202 202
203 /** 203 /**
204 * POLL for ACK. 204 * POLL for ACK.
205 */ 205 */
206 case GNUNET_MESSAGE_TYPE_CADET_POLL: 206 case GNUNET_MESSAGE_TYPE_CADET_POLL:
207 t = "POLL"; 207 s = "POLL";
208 break; 208 break;
209 209
210 /** 210 /**
211 * Announce origin is still alive. 211 * Announce origin is still alive.
212 */ 212 */
213 case GNUNET_MESSAGE_TYPE_CADET_KEEPALIVE: 213 case GNUNET_MESSAGE_TYPE_CADET_KEEPALIVE:
214 t = "KEEPALIVE"; 214 s = "KEEPALIVE";
215 break; 215 break;
216 216
217 /** 217 /**
218 * Connect to the cadet service, specifying subscriptions 218 * Connect to the cadet service, specifying subscriptions
219 */ 219 */
220 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_CONNECT: 220 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_CONNECT:
221 t = "LOCAL_CONNECT"; 221 s = "LOC_CONNCT";
222 break; 222 break;
223 223
224 /** 224 /**
225 * Ask the cadet service to create a new tunnel 225 * Ask the cadet service to create a new tunnel
226 */ 226 */
227 case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE: 227 case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_CREATE:
228 t = "CHAN_CREATE"; 228 s = "CHAN_CREAT";
229 break; 229 break;
230 230
231 /** 231 /**
232 * Ask the cadet service to destroy a tunnel 232 * Ask the cadet service to destroy a tunnel
233 */ 233 */
234 case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY: 234 case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY:
235 t = "CHAN_DESTROY"; 235 s = "CHAN_DSTRY";
236 break; 236 break;
237 237
238 /** 238 /**
239 * Confirm the creation of a channel. 239 * Confirm the creation of a channel.
240 */ 240 */
241 case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_ACK: 241 case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_ACK:
242 t = "CHAN_ACK"; 242 s = "CHAN_ACK";
243 break; 243 break;
244 244
245 /** 245 /**
246 * Confirm the creation of a channel. 246 * Confirm the creation of a channel.
247 */ 247 */
248 case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_NACK: 248 case GNUNET_MESSAGE_TYPE_CADET_CHANNEL_NACK:
249 t = "CHAN_NACK"; 249 s = "CHAN_NACK";
250 break; 250 break;
251 251
252 /** 252 /**
253 * OTR encrypted payload. 253 * OTR encrypted payload.
254 */ 254 */
255 case GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED: 255 case GNUNET_MESSAGE_TYPE_CADET_ENCRYPTED:
256 t = "OTR"; 256 s = "OTR";
257 break; 257 break;
258 258
259 /** 259 /**
260 * Axolotl encrypted payload. 260 * Axolotl encrypted payload.
261 */ 261 */
262 case GNUNET_MESSAGE_TYPE_CADET_AX: 262 case GNUNET_MESSAGE_TYPE_CADET_AX:
263 t = "AX"; 263 s = "AX";
264 break; 264 break;
265 265
266 /** 266 /**
267 * Local payload traffic 267 * Local payload traffic
268 */ 268 */
269 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA: 269 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA:
270 t = "LOCAL_DATA"; 270 s = "LOC_DATA";
271 break; 271 break;
272 272
273 /** 273 /**
274 * Local ACK for data. 274 * Local ACK for data.
275 */ 275 */
276 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK: 276 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK:
277 t = "LOCAL_ACK"; 277 s = "LOC_ACK";
278 break; 278 break;
279 279
280 /** 280 /**
281 * Local monitoring of channels. 281 * Local monitoring of channels.
282 */ 282 */
283 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNELS: 283 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNELS:
284 t = "INFO_CHANS"; 284 s = "INFO_CHANS";
285 break; 285 break;
286 286
287 /** 287 /**
288 * Local monitoring of a channel. 288 * Local monitoring of a channel.
289 */ 289 */
290 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNEL: 290 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNEL:
291 t = "INFO_CHAN"; 291 s = "INFO_CHAN";
292 break; 292 break;
293 293
294 /** 294 /**
295 * Local monitoring of service. 295 * Local monitoring of service.
296 */ 296 */
297 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS: 297 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS:
298 t = "INFO_TUNS"; 298 s = "INFO_TUNS";
299 break; 299 break;
300 300
301 /** 301 /**
302 * Local monitoring of service. 302 * Local monitoring of service.
303 */ 303 */
304 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL: 304 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL:
305 t = "INFO_TUN"; 305 s = "INFO_TUN";
306 break; 306 break;
307 307
308 /** 308 /**
309 * Local information about all connections of service. 309 * Local information about all connections of service.
310 */ 310 */
311 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTIONS: 311 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTIONS:
312 t = "INFO_CONNS"; 312 s = "INFO_CONNS";
313 break; 313 break;
314 314
315 /** 315 /**
316 * Local information of service about a specific connection. 316 * Local information of service about a specific connection.
317 */ 317 */
318 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTION: 318 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTION:
319 t = "INFO_CONN"; 319 s = "INFO_CONN";
320 break; 320 break;
321 321
322 /** 322 /**
323 * Local information about all peers known to the service. 323 * Local information about all peers known to the service.
324 */ 324 */
325 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS: 325 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS:
326 t = "INFO_PEERS"; 326 s = "INFO_PEERS";
327 break; 327 break;
328 328
329 /** 329 /**
330 * Local information of service about a specific peer. 330 * Local information of service about a specific peer.
331 */ 331 */
332 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER: 332 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER:
333 t = "INFO_PEER"; 333 s = "INFO_PEER";
334 break; 334 break;
335 335
336 /** 336 /**
337 * Traffic (net-cat style) used by the Command Line Interface. 337 * Traffic (net-cat style) used by the Command Line Interface.
338 */ 338 */
339 case GNUNET_MESSAGE_TYPE_CADET_CLI: 339 case GNUNET_MESSAGE_TYPE_CADET_CLI:
340 t = "CLI"; 340 s = "CLI";
341 break; 341 break;
342 342
343 /** 343 /**
344 * Debug request. 344 * Debug request.
345 */ 345 */
346 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_DUMP: 346 case GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_DUMP:
347 t = "INFO_DUMP"; 347 s = "INFO_DUMP";
348 break; 348 break;
349 349
350 default: 350 default:
351 SPRINTF(buf[idx], "%u (UNKNOWN)", m); 351 SPRINTF (buf[idx], "%u (UNKNOWN)", m);
352 return buf[idx]; 352 return buf[idx];
353 } 353 }
354 SPRINTF(buf[idx], "{%13s}", t); 354 SPRINTF (buf[idx], "{%10s}", s);
355 return buf[idx]; 355 return buf[idx];
356} 356}
357#else 357#else
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index f27637c7d..a9cf8c196 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -583,7 +583,7 @@ send_ack (struct CadetConnection *c, unsigned int buffer, int fwd, int force)
583 583
584 prev_fc->last_ack_sent = ack; 584 prev_fc->last_ack_sent = ack;
585 585
586 /* Build ACK message and send on connection */ 586 /* Build ACK message and send on conn */
587 msg.header.size = htons (sizeof (msg)); 587 msg.header.size = htons (sizeof (msg));
588 msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_ACK); 588 msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_ACK);
589 msg.ack = htonl (ack); 589 msg.ack = htonl (ack);
@@ -969,7 +969,7 @@ send_connection_ack (struct CadetConnection *connection, int fwd)
969 969
970 GCC_check_connections (); 970 GCC_check_connections ();
971 t = connection->t; 971 t = connection->t;
972 LOG (GNUNET_ERROR_TYPE_INFO, "---> {%14s ACK} on connection %s\n", 972 LOG (GNUNET_ERROR_TYPE_INFO, "--> {%14s ACK} on conn %s\n",
973 GC_f2s (!fwd), GCC_2s (connection)); 973 GC_f2s (!fwd), GCC_2s (connection));
974 GCP_queue_add (get_hop (connection, fwd), NULL, 974 GCP_queue_add (get_hop (connection, fwd), NULL,
975 GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK, 0, 0, 975 GNUNET_MESSAGE_TYPE_CADET_CONNECTION_ACK, 0, 0,
@@ -1032,7 +1032,7 @@ send_broken_unknown (const struct GNUNET_CADET_Hash *connection_id,
1032 struct CadetPeer *neighbor; 1032 struct CadetPeer *neighbor;
1033 1033
1034 GCC_check_connections (); 1034 GCC_check_connections ();
1035 LOG (GNUNET_ERROR_TYPE_INFO, "---> BROKEN on unknown connection %s\n", 1035 LOG (GNUNET_ERROR_TYPE_INFO, "--> BROKEN on unknown connection %s\n",
1036 GNUNET_h2s (GC_h2hc (connection_id))); 1036 GNUNET_h2s (GC_h2hc (connection_id)));
1037 1037
1038 msg = GNUNET_new (struct GNUNET_CADET_ConnectionBroken); 1038 msg = GNUNET_new (struct GNUNET_CADET_ConnectionBroken);
@@ -1886,7 +1886,7 @@ log_message (const struct GNUNET_MessageHeader *message,
1886 size = ntohs (message->size); 1886 size = ntohs (message->size);
1887 LOG (GNUNET_ERROR_TYPE_INFO, "\n"); 1887 LOG (GNUNET_ERROR_TYPE_INFO, "\n");
1888 LOG (GNUNET_ERROR_TYPE_INFO, "\n"); 1888 LOG (GNUNET_ERROR_TYPE_INFO, "\n");
1889 LOG (GNUNET_ERROR_TYPE_INFO, "<-- %s on connection %s from %s, %6u bytes\n", 1889 LOG (GNUNET_ERROR_TYPE_INFO, "<-- %s on conn %s from %s, %6u bytes\n",
1890 GC_m2s (ntohs (message->type)), GNUNET_h2s (GC_h2hc (hash)), 1890 GC_m2s (ntohs (message->type)), GNUNET_h2s (GC_h2hc (hash)),
1891 GNUNET_i2s (peer), (unsigned int) size); 1891 GNUNET_i2s (peer), (unsigned int) size);
1892} 1892}
@@ -3438,8 +3438,10 @@ GCC_send_prebuilt_message (const struct GNUNET_MessageHeader *message,
3438 data = GNUNET_malloc (size); 3438 data = GNUNET_malloc (size);
3439 memcpy (data, message, size); 3439 memcpy (data, message, size);
3440 type = ntohs (message->type); 3440 type = ntohs (message->type);
3441 LOG (GNUNET_ERROR_TYPE_INFO, "--> %s (%s %4u) on connection %s (%u bytes)\n", 3441 LOG (GNUNET_ERROR_TYPE_INFO,
3442 GC_m2s (type), GC_m2s (payload_type), payload_id, GCC_2s (c), size); 3442 "--> %s (%s %4u) on conn %s (%p) %s (%u bytes)\n",
3443 GC_m2s (type), GC_m2s (payload_type), payload_id, GCC_2s (c), c,
3444 GC_f2s(fwd), size);
3443 3445
3444 fc = fwd ? &c->fwd_fc : &c->bck_fc; 3446 fc = fwd ? &c->fwd_fc : &c->bck_fc;
3445 droppable = GNUNET_NO == force; 3447 droppable = GNUNET_NO == force;
@@ -3601,7 +3603,7 @@ GCC_send_create (struct CadetConnection *connection)
3601 size = sizeof (struct GNUNET_CADET_ConnectionCreate); 3603 size = sizeof (struct GNUNET_CADET_ConnectionCreate);
3602 size += connection->path->length * sizeof (struct GNUNET_PeerIdentity); 3604 size += connection->path->length * sizeof (struct GNUNET_PeerIdentity);
3603 3605
3604 LOG (GNUNET_ERROR_TYPE_INFO, "---> %s on connection %s (%u bytes)\n", 3606 LOG (GNUNET_ERROR_TYPE_INFO, "--> %s on conn %s (%u bytes)\n",
3605 GC_m2s (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE), 3607 GC_m2s (GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE),
3606 GCC_2s (connection), size); 3608 GCC_2s (connection), size);
3607 LOG (GNUNET_ERROR_TYPE_DEBUG, " C_P+ %p %u (create)\n", 3609 LOG (GNUNET_ERROR_TYPE_DEBUG, " C_P+ %p %u (create)\n",
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c
index e7da408c5..165553d1c 100644
--- a/src/cadet/gnunet-service-cadet_peer.c
+++ b/src/cadet/gnunet-service-cadet_peer.c
@@ -1150,6 +1150,7 @@ queue_send (void *cls, size_t size, void *buf)
1150 struct CadetConnection *c; 1150 struct CadetConnection *c;
1151 struct CadetPeerQueue *queue; 1151 struct CadetPeerQueue *queue;
1152 struct GNUNET_TIME_Relative core_wait_time; 1152 struct GNUNET_TIME_Relative core_wait_time;
1153 const char *wait_s;
1153 const struct GNUNET_PeerIdentity *dst_id; 1154 const struct GNUNET_PeerIdentity *dst_id;
1154 size_t msg_size; 1155 size_t msg_size;
1155 size_t total_size; 1156 size_t total_size;
@@ -1175,7 +1176,7 @@ queue_send (void *cls, size_t size, void *buf)
1175 peer->core_transmit = NULL; 1176 peer->core_transmit = NULL;
1176 peer->tmt_time.abs_value_us = 0; 1177 peer->tmt_time.abs_value_us = 0;
1177 GCC_check_connections (); 1178 GCC_check_connections ();
1178 return; 1179 return 0;
1179 } 1180 }
1180 dst_id = GNUNET_PEER_resolve2 (peer->id); 1181 dst_id = GNUNET_PEER_resolve2 (peer->id);
1181 peer->core_transmit = 1182 peer->core_transmit =
@@ -1211,18 +1212,12 @@ queue_send (void *cls, size_t size, void *buf)
1211 return 0; 1212 return 0;
1212 } 1213 }
1213 core_wait_time = GNUNET_TIME_absolute_get_duration (peer->tmt_time); 1214 core_wait_time = GNUNET_TIME_absolute_get_duration (peer->tmt_time);
1215 wait_s = GNUNET_STRINGS_relative_time_to_string (core_wait_time, GNUNET_YES);
1214 if (core_wait_time.rel_value_us >= 1000000) 1216 if (core_wait_time.rel_value_us >= 1000000)
1215 { 1217 {
1216 LOG (GNUNET_ERROR_TYPE_ERROR, 1218 LOG (GNUNET_ERROR_TYPE_ERROR,
1217 " %s: core wait time %s (> 1 second) for %u bytes\n", 1219 " %s: core wait time %s (> 1 second) for %u bytes\n",
1218 GCP_2s (peer), 1220 GCP_2s (peer), wait_s, queue->size);
1219 GNUNET_STRINGS_relative_time_to_string (core_wait_time, GNUNET_YES),
1220 queue->size);
1221 }
1222 else
1223 {
1224 LOG (GNUNET_ERROR_TYPE_DEBUG, " core wait time %s\n",
1225 GNUNET_STRINGS_relative_time_to_string (core_wait_time, GNUNET_YES));
1226 } 1221 }
1227 peer->tmt_time.abs_value_us = 0; 1222 peer->tmt_time.abs_value_us = 0;
1228 1223
@@ -1231,7 +1226,7 @@ queue_send (void *cls, size_t size, void *buf)
1231 { 1226 {
1232 c = queue->c; 1227 c = queue->c;
1233 1228
1234 LOG (GNUNET_ERROR_TYPE_DEBUG, " on connection %s %s\n", 1229 LOG (GNUNET_ERROR_TYPE_DEBUG, " on conn %s %s\n",
1235 GCC_2s (c), GC_f2s(queue->fwd)); 1230 GCC_2s (c), GC_f2s(queue->fwd));
1236 LOG (GNUNET_ERROR_TYPE_DEBUG, " size %u ok (%u/%u)\n", 1231 LOG (GNUNET_ERROR_TYPE_DEBUG, " size %u ok (%u/%u)\n",
1237 queue->size, total_size, size); 1232 queue->size, total_size, size);
@@ -1241,7 +1236,7 @@ queue_send (void *cls, size_t size, void *buf)
1241 if (0 < drop_percent && 1236 if (0 < drop_percent &&
1242 GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 101) < drop_percent) 1237 GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 101) < drop_percent)
1243 { 1238 {
1244 LOG (GNUNET_ERROR_TYPE_WARNING, "DD %s (%s %u) on connection %s %s\n", 1239 LOG (GNUNET_ERROR_TYPE_WARNING, "DD %s (%s %u) on conn %s %s\n",
1245 GC_m2s (queue->type), GC_m2s (queue->payload_type), 1240 GC_m2s (queue->type), GC_m2s (queue->payload_type),
1246 queue->payload_id, GCC_2s (c), GC_f2s (queue->fwd)); 1241 queue->payload_id, GCC_2s (c), GC_f2s (queue->fwd));
1247 msg_size = 0; 1242 msg_size = 0;
@@ -1249,9 +1244,10 @@ queue_send (void *cls, size_t size, void *buf)
1249 else 1244 else
1250 { 1245 {
1251 LOG (GNUNET_ERROR_TYPE_INFO, 1246 LOG (GNUNET_ERROR_TYPE_INFO,
1252 "snd %s (%s %4u) on connection %s (%p) %s (size %u)\n", 1247 ">>> %s (%s %4u) on conn %s (%p) %s (%u bytes), after %s\n",
1253 GC_m2s (queue->type), GC_m2s (queue->payload_type), 1248 GC_m2s (queue->type), GC_m2s (queue->payload_type),
1254 queue->payload_id, GCC_2s (c), c, GC_f2s (queue->fwd), msg_size); 1249 queue->payload_id, GCC_2s (c), c,
1250 GC_f2s (queue->fwd), msg_size, wait_s);
1255 } 1251 }
1256 total_size += msg_size; 1252 total_size += msg_size;
1257 rest -= msg_size; 1253 rest -= msg_size;
@@ -1429,7 +1425,7 @@ GCP_queue_add (struct CadetPeer *peer,
1429 1425
1430 GCC_check_connections (); 1426 GCC_check_connections ();
1431 LOG (GNUNET_ERROR_TYPE_DEBUG, 1427 LOG (GNUNET_ERROR_TYPE_DEBUG,
1432 "que %s (%s %4u) on connection %s (%p) %s towards %s (size %u)\n", 1428 "que %s (%s %4u) on conn %s (%p) %s towards %s (size %u)\n",
1433 GC_m2s (type), GC_m2s (payload_type), payload_id, 1429 GC_m2s (type), GC_m2s (payload_type), payload_id,
1434 GCC_2s (c), c, GC_f2s (fwd), GCP_2s (peer), size); 1430 GCC_2s (c), c, GC_f2s (fwd), GCP_2s (peer), size);
1435 1431
@@ -1627,7 +1623,7 @@ GCP_connection_pop (struct CadetPeer *peer,
1627 1623
1628 GCC_check_connections (); 1624 GCC_check_connections ();
1629 GNUNET_assert (NULL != destroyed); 1625 GNUNET_assert (NULL != destroyed);
1630 LOG (GNUNET_ERROR_TYPE_DEBUG, "connection_pop on connection %p\n", c); 1626 LOG (GNUNET_ERROR_TYPE_DEBUG, "connection_pop on conn %p\n", c);
1631 for (q = peer->queue_head; NULL != q; q = next) 1627 for (q = peer->queue_head; NULL != q; q = next)
1632 { 1628 {
1633 next = q->next; 1629 next = q->next;