aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-service-fs_stream.c')
-rw-r--r--src/fs/gnunet-service-fs_stream.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/fs/gnunet-service-fs_stream.c b/src/fs/gnunet-service-fs_stream.c
index 24aeaf888..e05616c45 100644
--- a/src/fs/gnunet-service-fs_stream.c
+++ b/src/fs/gnunet-service-fs_stream.c
@@ -1037,7 +1037,7 @@ continue_reading (struct StreamClient *sc)
1037 GNUNET_SERVER_mst_receive (sc->mst, 1037 GNUNET_SERVER_mst_receive (sc->mst,
1038 NULL, 1038 NULL,
1039 NULL, 0, 1039 NULL, 0,
1040 GNUNET_NO, GNUNET_YES); 1040 GNUNET_NO, GNUNET_NO);
1041 if (GNUNET_NO == ret) 1041 if (GNUNET_NO == ret)
1042 return; 1042 return;
1043 refresh_timeout_task (sc); 1043 refresh_timeout_task (sc);
@@ -1088,7 +1088,7 @@ process_request (void *cls,
1088 GNUNET_SERVER_mst_receive (sc->mst, 1088 GNUNET_SERVER_mst_receive (sc->mst,
1089 NULL, 1089 NULL,
1090 data, size, 1090 data, size,
1091 GNUNET_NO, GNUNET_YES); 1091 GNUNET_NO, GNUNET_NO);
1092 if (GNUNET_NO == ret) 1092 if (GNUNET_NO == ret)
1093 return size; /* more messages in MST */ 1093 return size; /* more messages in MST */
1094 if (GNUNET_SYSERR == ret) 1094 if (GNUNET_SYSERR == ret)
@@ -1219,6 +1219,8 @@ handle_datastore_reply (void *cls,
1219 sc->qe = NULL; 1219 sc->qe = NULL;
1220 if (GNUNET_BLOCK_TYPE_FS_ONDEMAND == type) 1220 if (GNUNET_BLOCK_TYPE_FS_ONDEMAND == type)
1221 { 1221 {
1222 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1223 "Performing on-demand encoding\n");
1222 if (GNUNET_OK != 1224 if (GNUNET_OK !=
1223 GNUNET_FS_handle_on_demand_block (key, 1225 GNUNET_FS_handle_on_demand_block (key,
1224 size, data, type, 1226 size, data, type,
@@ -1227,6 +1229,8 @@ handle_datastore_reply (void *cls,
1227 &handle_datastore_reply, 1229 &handle_datastore_reply,
1228 sc)) 1230 sc))
1229 { 1231 {
1232 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1233 "On-demand encoding request failed\n");
1230 continue_writing (sc); 1234 continue_writing (sc);
1231 } 1235 }
1232 return; 1236 return;
@@ -1238,8 +1242,9 @@ handle_datastore_reply (void *cls,
1238 return; 1242 return;
1239 } 1243 }
1240 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1244 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1241 "Starting transmission of %u byte reply via stream\n", 1245 "Starting transmission of %u byte reply for query `%s' via stream\n",
1242 (unsigned int) size); 1246 (unsigned int) size,
1247 GNUNET_h2s (key));
1243 wqi = GNUNET_malloc (sizeof (struct WriteQueueItem) + msize); 1248 wqi = GNUNET_malloc (sizeof (struct WriteQueueItem) + msize);
1244 wqi->msize = msize; 1249 wqi->msize = msize;
1245 srm = (struct StreamReplyMessage *) &wqi[1]; 1250 srm = (struct StreamReplyMessage *) &wqi[1];
@@ -1302,7 +1307,11 @@ request_cb (void *cls,
1302 GNUNET_TIME_UNIT_FOREVER_REL, 1307 GNUNET_TIME_UNIT_FOREVER_REL,
1303 &handle_datastore_reply, sc); 1308 &handle_datastore_reply, sc);
1304 if (NULL == sc->qe) 1309 if (NULL == sc->qe)
1310 {
1311 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1312 "Queueing request with datastore failed (queue full?)\n");
1305 continue_writing (sc); 1313 continue_writing (sc);
1314 }
1306 return GNUNET_OK; 1315 return GNUNET_OK;
1307 default: 1316 default:
1308 GNUNET_break_op (0); 1317 GNUNET_break_op (0);