aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-service-fs_push.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-03-27 14:08:36 +0000
committerChristian Grothoff <christian@grothoff.org>2011-03-27 14:08:36 +0000
commit816b7a1abcc0a5e6665273958101e3c95447e56b (patch)
treeaef8087e58080c229ea65b45856dfffa023f3523 /src/fs/gnunet-service-fs_push.c
parent0c3d376ccca792725f0e080dc9a16fbd56e682b0 (diff)
downloadgnunet-816b7a1abcc0a5e6665273958101e3c95447e56b.tar.gz
gnunet-816b7a1abcc0a5e6665273958101e3c95447e56b.zip
stuff
Diffstat (limited to 'src/fs/gnunet-service-fs_push.c')
-rw-r--r--src/fs/gnunet-service-fs_push.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/fs/gnunet-service-fs_push.c b/src/fs/gnunet-service-fs_push.c
index 58588ebdb..65b15f356 100644
--- a/src/fs/gnunet-service-fs_push.c
+++ b/src/fs/gnunet-service-fs_push.c
@@ -219,6 +219,10 @@ transmit_message (void *cls,
219 peer->msg = NULL; 219 peer->msg = NULL;
220 if (buf == NULL) 220 if (buf == NULL)
221 { 221 {
222#if DEBUG_FS
223 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
224 "Failed to migrate content to another peer (disconnect)\n");
225#endif
222 GNUNET_free (msg); 226 GNUNET_free (msg);
223 return 0; 227 return 0;
224 } 228 }
@@ -257,9 +261,10 @@ transmit_content (struct MigrationReadyPeer *peer,
257 GNUNET_assert (NULL == peer->th); 261 GNUNET_assert (NULL == peer->th);
258 msize = sizeof (struct PutMessage) + block->size; 262 msize = sizeof (struct PutMessage) + block->size;
259 msg = GNUNET_malloc (msize); 263 msg = GNUNET_malloc (msize);
260 msg->header.type = htons (42); 264 msg->header.type = htons (GNUNET_MESSAGE_TYPE_FS_PUT);
261 msg->header.size = htons (msize); 265 msg->header.size = htons (msize);
262 GNUNET_break (0); 266 msg->type = htonl (block->type);
267 msg->expiration = GNUNET_TIME_absolute_hton (block->expiration);
263 memcpy (&msg[1], 268 memcpy (&msg[1],
264 &block[1], 269 &block[1],
265 block->size); 270 block->size);
@@ -282,6 +287,11 @@ transmit_content (struct MigrationReadyPeer *peer,
282 { 287 {
283 ret = GNUNET_NO; 288 ret = GNUNET_NO;
284 } 289 }
290#if DEBUG_FS
291 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
292 "Asking for transmission of %u bytes for migration\n",
293 msize);
294#endif
285 peer->th = GSF_peer_transmit_ (peer->peer, 295 peer->th = GSF_peer_transmit_ (peer->peer,
286 GNUNET_NO, 296 GNUNET_NO,
287 0 /* priority */, 297 0 /* priority */,