aboutsummaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-06-16 12:02:03 +0000
committerChristian Grothoff <christian@grothoff.org>2011-06-16 12:02:03 +0000
commitb365d74222adc5fc86eb5803569904f8fa8958af (patch)
treecb6b996014af5b4e2d26e9ec1f61ec02f85f4d40 /src/fs
parent91ff6c2b48ef331a566f5df0134bf8e6af178b94 (diff)
downloadgnunet-b365d74222adc5fc86eb5803569904f8fa8958af.tar.gz
gnunet-b365d74222adc5fc86eb5803569904f8fa8958af.zip
fix
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/gnunet-service-fs_cp.c4
-rw-r--r--src/fs/gnunet-service-fs_pr.c28
2 files changed, 30 insertions, 2 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c
index 9686c7dfe..1d7360624 100644
--- a/src/fs/gnunet-service-fs_cp.c
+++ b/src/fs/gnunet-service-fs_cp.c
@@ -1158,6 +1158,10 @@ GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other,
1158 GNUNET_break_op (0); 1158 GNUNET_break_op (0);
1159 return NULL; 1159 return NULL;
1160 } 1160 }
1161 GNUNET_STATISTICS_update (GSF_stats,
1162 gettext_noop ("# GET requests received (from other peers)"),
1163 1,
1164 GNUNET_NO);
1161 gm = (const struct GetMessage*) message; 1165 gm = (const struct GetMessage*) message;
1162 type = ntohl (gm->type); 1166 type = ntohl (gm->type);
1163 bm = ntohl (gm->hash_bitmap); 1167 bm = ntohl (gm->hash_bitmap);
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c
index 3c9916c13..10be10e12 100644
--- a/src/fs/gnunet-service-fs_pr.c
+++ b/src/fs/gnunet-service-fs_pr.c
@@ -138,6 +138,11 @@ struct GSF_PendingRequest
138 */ 138 */
139 uint32_t mingle; 139 uint32_t mingle;
140 140
141 /**
142 * Do we have a first UID yet?
143 */
144 int have_first_uid;
145
141}; 146};
142 147
143 148
@@ -969,6 +974,10 @@ handle_dht_reply (void *cls,
969 struct ProcessReplyClosure prq; 974 struct ProcessReplyClosure prq;
970 struct PutMigrationContext *pmc; 975 struct PutMigrationContext *pmc;
971 976
977 GNUNET_STATISTICS_update (GSF_stats,
978 gettext_noop ("# Replies received from DHT"),
979 1,
980 GNUNET_NO);
972 memset (&prq, 0, sizeof (prq)); 981 memset (&prq, 0, sizeof (prq));
973 prq.data = data; 982 prq.data = data;
974 prq.expiration = exp; 983 prq.expiration = exp;
@@ -1133,14 +1142,21 @@ process_local_reply (void *cls,
1133 pr->qe = NULL; 1142 pr->qe = NULL;
1134 GNUNET_SCHEDULER_cancel (pr->warn_task); 1143 GNUNET_SCHEDULER_cancel (pr->warn_task);
1135 pr->warn_task = GNUNET_SCHEDULER_NO_TASK; 1144 pr->warn_task = GNUNET_SCHEDULER_NO_TASK;
1136 if (0 == pr->replies_seen_count) 1145 if (GNUNET_NO == pr->have_first_uid)
1137 { 1146 {
1138 pr->first_uid = uid; 1147 pr->first_uid = uid;
1148 pr->have_first_uid = GNUNET_YES;
1139 } 1149 }
1140 else 1150 else
1141 { 1151 {
1142 if (uid == pr->first_uid) 1152 if (uid == pr->first_uid)
1143 key = NULL; /* all replies seen! */ 1153 {
1154 GNUNET_STATISTICS_update (GSF_stats,
1155 gettext_noop ("# Datastore lookups concluded"),
1156 1,
1157 GNUNET_NO);
1158 key = NULL; /* all replies seen! */
1159 }
1144 } 1160 }
1145 if (NULL == key) 1161 if (NULL == key)
1146 { 1162 {
@@ -1342,6 +1358,10 @@ GSF_local_lookup_ (struct GSF_PendingRequest *pr,
1342 pr->warn_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, 1358 pr->warn_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES,
1343 &warn_delay_task, 1359 &warn_delay_task,
1344 pr); 1360 pr);
1361 GNUNET_STATISTICS_update (GSF_stats,
1362 gettext_noop ("# Datastore lookups initiated"),
1363 1,
1364 GNUNET_NO);
1345 pr->qe = GNUNET_DATASTORE_get_key (GSF_dsh, 1365 pr->qe = GNUNET_DATASTORE_get_key (GSF_dsh,
1346 pr->local_result_offset++, 1366 pr->local_result_offset++,
1347 &pr->public_data.query, 1367 &pr->public_data.query,
@@ -1418,6 +1438,10 @@ GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
1418 GNUNET_break_op (0); 1438 GNUNET_break_op (0);
1419 return GNUNET_SYSERR; 1439 return GNUNET_SYSERR;
1420 } 1440 }
1441 GNUNET_STATISTICS_update (GSF_stats,
1442 gettext_noop ("# GAP PUT messages received"),
1443 1,
1444 GNUNET_NO);
1421 /* now, lookup 'query' */ 1445 /* now, lookup 'query' */
1422 prq.data = (const void*) &put[1]; 1446 prq.data = (const void*) &put[1];
1423 if (NULL != cp) 1447 if (NULL != cp)