[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r15232 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r15232 - gnunet/src/mesh |
Date: |
Fri, 13 May 2011 21:17:54 +0200 |
Author: bartpolot
Date: 2011-05-13 21:17:54 +0200 (Fri, 13 May 2011)
New Revision: 15232
Modified:
gnunet/src/mesh/mesh.h
gnunet/src/mesh/mesh_api_new.c
Log:
WiP
Modified: gnunet/src/mesh/mesh.h
===================================================================
--- gnunet/src/mesh/mesh.h 2011-05-13 13:30:03 UTC (rev 15231)
+++ gnunet/src/mesh/mesh.h 2011-05-13 19:17:54 UTC (rev 15232)
@@ -57,7 +57,7 @@
* EVENT MESSAGE USED
* ----- ------------
* notify_transmit_ready reply GNUNET_MESH_TransmitReady
- * notify_transmit_ready data GNUNET_MESH_Data or
+ * notify_transmit_ready data GNUNET_MESH_Data OR
* GNUNET_MESH_DataBroadcast
* new incoming tunnel GNUNET_MESH_PeerControl
* peer connects to a tunnel GNUNET_MESH_PeerControl
Modified: gnunet/src/mesh/mesh_api_new.c
===================================================================
--- gnunet/src/mesh/mesh_api_new.c 2011-05-13 13:30:03 UTC (rev 15231)
+++ gnunet/src/mesh/mesh_api_new.c 2011-05-13 19:17:54 UTC (rev 15232)
@@ -269,20 +269,29 @@
}
switch (ntohs(msg->type)) {
+ /* Notify of a new incoming tunnel */
+ case GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE:
+ /* */
+ break;
+ /* Notify of a new peer in the tunnel */
case GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_CONNECTED:
break;
+ /* Notify of a peer leaving the tunnel */
+ case GNUNET_MESSAGE_TYPE_MESH_LOCAL_PEER_DISCONNECTED:
+ break;
+ /* Notify of a new data packet in the tunnel */
case GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA:
payload = &msg[1];
for (i = 0, type = ntohs(payload->type); i < h->n_handlers; i++) {
handler = &h->message_handlers[i];
if (handler->type == type) {
- if (GNUNET_OK == handler->callback (cls,
+ /* FIXME */
+ if (GNUNET_OK == handler->callback (h->cls,
NULL,
NULL,
NULL,
NULL,
- NULL
- ))
+ NULL))
{
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"MESH: callback completed successfully\n");
@@ -294,14 +303,19 @@
}
}
break;
+ /* We shouldn't get any other packages, log and ignore */
default:
GNUNET_log(GNUNET_ERROR_TYPE_WARNING,
- "MESH: unsolited message form service (type %d)\n",
+ "MESH: unsolicited message form service (type %d)\n",
ntohs(msg->type));
}
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
"received a message from mesh\n");
+ GNUNET_CLIENT_receive (h->client,
+ &msg_received,
+ h,
+ GNUNET_TIME_UNIT_FOREVER_REL);
return;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r15232 - gnunet/src/mesh,
gnunet <=