- GMCH_send can try to free saved message, save first
authorBart Polot <bart@net.in.tum.de>
Tue, 15 Oct 2013 12:53:26 +0000 (12:53 +0000)
committerBart Polot <bart@net.in.tum.de>
Tue, 15 Oct 2013 12:53:26 +0000 (12:53 +0000)
src/mesh/gnunet-service-mesh_channel.c

index bd1e641367b73147deba9c152b5c152b6a16c76e..b02da1abac9e62d6d4ea99cda958ccf9169c8c44 100644 (file)
@@ -1256,10 +1256,10 @@ GMCH_handle_local_data (struct MeshChannel *ch,
   payload->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_DATA);
   payload->chid = htonl (ch->gid);
   LOG (GNUNET_ERROR_TYPE_DEBUG, "  sending on channel...\n");
-  GMCH_send_prebuilt_message (&payload->header, ch, fwd);
-
   if (GNUNET_YES == ch->reliable)
     channel_save_copy (ch, &payload->header, fwd);
+  GMCH_send_prebuilt_message (&payload->header, ch, fwd);
+
   if (GMT_get_buffer (ch->t, fwd) > 0)
   {
     send_client_ack (ch, fwd);