aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-06-24 01:54:15 +0000
committerBart Polot <bart@net.in.tum.de>2014-06-24 01:54:15 +0000
commit13a0854ef3e792fa06660ede9f266c988053b891 (patch)
treeb23ff232fab7bb02005b174d4d38cec3d9dc17e8 /src
parentd3662de816da8d7e4ede7aca3a79f086452b2b25 (diff)
downloadgnunet-13a0854ef3e792fa06660ede9f266c988053b891.tar.gz
gnunet-13a0854ef3e792fa06660ede9f266c988053b891.zip
- add last contact, DHT handle to peer debug info, for #3405
Diffstat (limited to 'src')
-rw-r--r--src/cadet/gnunet-service-cadet_peer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c
index 07d54b9da..39a6670ce 100644
--- a/src/cadet/gnunet-service-cadet_peer.c
+++ b/src/cadet/gnunet-service-cadet_peer.c
@@ -1463,6 +1463,7 @@ GCP_init (const struct GNUNET_CONFIGURATION_Handle *c)
1463 1463
1464} 1464}
1465 1465
1466
1466/** 1467/**
1467 * Shut down the peer subsystem. 1468 * Shut down the peer subsystem.
1468 */ 1469 */
@@ -1484,6 +1485,7 @@ GCP_shutdown (void)
1484 GNUNET_PEER_change_rc (myid, -1); 1485 GNUNET_PEER_change_rc (myid, -1);
1485} 1486}
1486 1487
1488
1487/** 1489/**
1488 * Retrieve the CadetPeer stucture associated with the peer, create one 1490 * Retrieve the CadetPeer stucture associated with the peer, create one
1489 * and insert it in the appropriate structures if the peer is not known yet. 1491 * and insert it in the appropriate structures if the peer is not known yet.
@@ -1509,7 +1511,7 @@ GCP_get (const struct GNUNET_PeerIdentity *peer_id)
1509 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); 1511 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
1510 peer->id = GNUNET_PEER_intern (peer_id); 1512 peer->id = GNUNET_PEER_intern (peer_id);
1511 } 1513 }
1512 peer->last_contact = GNUNET_TIME_absolute_get(); 1514 peer->last_contact = GNUNET_TIME_absolute_get ();
1513 1515
1514 return peer; 1516 return peer;
1515} 1517}
@@ -2245,6 +2247,8 @@ GCP_debug (const struct CadetPeer *p, enum GNUNET_ErrorType level)
2245 } 2247 }
2246 2248
2247 LOG (level, "PPP DEBUG PEER %s\n", GCP_2s (p)); 2249 LOG (level, "PPP DEBUG PEER %s\n", GCP_2s (p));
2250 LOG (level, "PPP last contact %s\n",
2251 GNUNET_STRINGS_absolute_time_to_string (p->last_contact));
2248 for (path = p->path_head; NULL != path; path = path->next) 2252 for (path = p->path_head; NULL != path; path = path->next)
2249 { 2253 {
2250 char *s; 2254 char *s;
@@ -2255,6 +2259,7 @@ GCP_debug (const struct CadetPeer *p, enum GNUNET_ErrorType level)
2255 } 2259 }
2256 2260
2257 LOG (level, "PPP core transmit handle %p\n", p->core_transmit); 2261 LOG (level, "PPP core transmit handle %p\n", p->core_transmit);
2262 LOG (level, "PPP DHT GET handle\n", p->search_h);
2258 conns = GNUNET_CONTAINER_multihashmap_size (p->connections); 2263 conns = GNUNET_CONTAINER_multihashmap_size (p->connections);
2259 LOG (level, "PPP # connections over link to peer: %u\n", conns); 2264 LOG (level, "PPP # connections over link to peer: %u\n", conns);
2260 LOG (level, "PPP queue length: %u\n", p->queue_n); 2265 LOG (level, "PPP queue length: %u\n", p->queue_n);