aboutsummaryrefslogtreecommitdiff
path: root/src/mesh
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2014-04-10 11:23:33 +0000
committerBart Polot <bart@net.in.tum.de>2014-04-10 11:23:33 +0000
commit524134e56dceed316e82a863b72cee9f807af911 (patch)
tree62fcc2a1ed7cf432b7c9bc94eeeba915f251cec7 /src/mesh
parent39a795720906566f132017a3db4c1daf223019c5 (diff)
downloadgnunet-524134e56dceed316e82a863b72cee9f807af911.tar.gz
gnunet-524134e56dceed316e82a863b72cee9f807af911.zip
- if data comes from an unknown channel (we might have just destroyed it and the service doesnt know), ignore and warn, dont crash
Diffstat (limited to 'src/mesh')
-rw-r--r--src/mesh/mesh_api.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c
index 05d6dde9e..4c69c6afd 100644
--- a/src/mesh/mesh_api.c
+++ b/src/mesh/mesh_api.c
@@ -857,6 +857,12 @@ process_incoming_data (struct GNUNET_MESH_Handle *h,
857 LOG (GNUNET_ERROR_TYPE_DEBUG, "Got a data message!\n"); 857 LOG (GNUNET_ERROR_TYPE_DEBUG, "Got a data message!\n");
858 dmsg = (struct GNUNET_MESH_LocalData *) message; 858 dmsg = (struct GNUNET_MESH_LocalData *) message;
859 ch = retrieve_channel (h, ntohl (dmsg->id)); 859 ch = retrieve_channel (h, ntohl (dmsg->id));
860 if (NULL == ch)
861 {
862 GNUNET_break (0);
863 return;
864 }
865
860 payload = (struct GNUNET_MessageHeader *) &dmsg[1]; 866 payload = (struct GNUNET_MessageHeader *) &dmsg[1];
861 LOG (GNUNET_ERROR_TYPE_DEBUG, " %s data on channel %s [%X]\n", 867 LOG (GNUNET_ERROR_TYPE_DEBUG, " %s data on channel %s [%X]\n",
862 GM_f2s (ch->chid >= GNUNET_MESH_LOCAL_CHANNEL_ID_SERV), 868 GM_f2s (ch->chid >= GNUNET_MESH_LOCAL_CHANNEL_ID_SERV),