gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r27991 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r27991 - gnunet/src/mesh
Date: Sat, 13 Jul 2013 13:50:31 +0200

Author: bartpolot
Date: 2013-07-13 13:50:31 +0200 (Sat, 13 Jul 2013)
New Revision: 27991

Modified:
   gnunet/src/mesh/gnunet-service-mesh.c
   gnunet/src/mesh/mesh.h
   gnunet/src/mesh/mesh_api.c
Log:
- use one tunnelnotification struct

Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c       2013-07-13 11:46:13 UTC (rev 
27990)
+++ gnunet/src/mesh/gnunet-service-mesh.c       2013-07-13 11:50:31 UTC (rev 
27991)
@@ -1036,10 +1036,10 @@
   msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
   msg.tunnel_id = htonl (t->local_tid_dest);
   msg.port = htonl (t->port);
-  msg.options = 0;
-  msg.options |= GNUNET_YES == t->reliable ? GNUNET_MESH_OPTION_RELIABLE : 0;
-  msg.options |= GNUNET_YES == t->nobuffer ? GNUNET_MESH_OPTION_NOBUFFER : 0;
-  msg.options = htonl (msg.options);
+  msg.opt = 0;
+  msg.opt |= GNUNET_YES == t->reliable ? GNUNET_MESH_OPTION_RELIABLE : 0;
+  msg.opt |= GNUNET_YES == t->nobuffer ? GNUNET_MESH_OPTION_NOBUFFER : 0;
+  msg.opt = htonl (msg.opt);
   GNUNET_PEER_resolve (t->id.oid, &msg.peer);
   GNUNET_SERVER_notification_context_unicast (nc, t->client->handle,
                                               &msg.header, GNUNET_NO);
@@ -4836,7 +4836,7 @@
     return;
   }
   t->port = ntohl (t_msg->port);
-  tunnel_set_options (t, ntohl (t_msg->options));
+  tunnel_set_options (t, ntohl (t_msg->opt));
   if (GNUNET_YES == t->reliable)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "!!! Reliable\n");

Modified: gnunet/src/mesh/mesh.h
===================================================================
--- gnunet/src/mesh/mesh.h      2013-07-13 11:46:13 UTC (rev 27990)
+++ gnunet/src/mesh/mesh.h      2013-07-13 11:50:31 UTC (rev 27991)
@@ -174,7 +174,7 @@
     /**
      * Options.
      */
-  uint32_t options GNUNET_PACKED;
+  uint32_t opt GNUNET_PACKED;
 };
 
 

Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c  2013-07-13 11:46:13 UTC (rev 27990)
+++ gnunet/src/mesh/mesh_api.c  2013-07-13 11:50:31 UTC (rev 27991)
@@ -736,7 +736,7 @@
     if (GNUNET_YES == t->reliable)
       options |= GNUNET_MESH_OPTION_RELIABLE;
 
-    tmsg.options = htonl (options);
+    tmsg.opt = htonl (options);
     send_packet (h, &tmsg.header, t);
   }
   return GNUNET_YES;
@@ -791,7 +791,7 @@
  */
 static void
 process_tunnel_created (struct GNUNET_MESH_Handle *h,
-                        const struct GNUNET_MESH_TunnelNotification *msg)
+                        const struct GNUNET_MESH_TunnelMessage *msg)
 {
   struct GNUNET_MESH_Tunnel *t;
   MESH_TunnelNumber tid;
@@ -834,7 +834,7 @@
     d_msg.tunnel_id = msg->tunnel_id;
     memset (&d_msg.peer, 0, sizeof (struct GNUNET_PeerIdentity));
     d_msg.port = 0;
-    d_msg.options = 0;
+    d_msg.opt = 0;
 
     send_packet (h, &d_msg.header, NULL);
   }
@@ -1076,7 +1076,7 @@
   {
     /* Notify of a new incoming tunnel */
   case GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE:
-    process_tunnel_created (h, (struct GNUNET_MESH_TunnelNotification *) msg);
+    process_tunnel_created (h, (struct GNUNET_MESH_TunnelMessage *) msg);
     break;
     /* Notify of a tunnel disconnection */
   case GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_DESTROY:
@@ -1426,12 +1426,12 @@
   msg.tunnel_id = htonl (t->tid);
   msg.port = htonl (port);
   msg.peer = *peer;
-  msg.options = 0;
+  msg.opt = 0;
   if (GNUNET_YES == reliable)
-    msg.options |= GNUNET_MESH_OPTION_RELIABLE;
+    msg.opt |= GNUNET_MESH_OPTION_RELIABLE;
   if (GNUNET_NO == buffer)
-    msg.options |= GNUNET_MESH_OPTION_NOBUFFER;
-  msg.options = htonl (msg.options);
+    msg.opt |= GNUNET_MESH_OPTION_NOBUFFER;
+  msg.opt = htonl (msg.opt);
   t->allow_send = 0;
   send_packet (h, &msg.header, t);
   return t;
@@ -1453,7 +1453,7 @@
   msg.tunnel_id = htonl (tunnel->tid);
   memset (&msg.peer, 0, sizeof (struct GNUNET_PeerIdentity));
   msg.port = 0;
-  msg.options = 0;
+  msg.opt = 0;
   th = h->th_head;
   while (th != NULL)
   {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]