[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30090 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30090 - gnunet/src/mesh |
Date: |
Thu, 10 Oct 2013 15:27:28 +0200 |
Author: bartpolot
Date: 2013-10-10 15:27:28 +0200 (Thu, 10 Oct 2013)
New Revision: 30090
Modified:
gnunet/src/mesh/gnunet-service-mesh_channel.c
gnunet/src/mesh/gnunet-service-mesh_connection.c
gnunet/src/mesh/gnunet-service-mesh_peer.c
gnunet/src/mesh/gnunet-service-mesh_tunnel.c
gnunet/src/mesh/gnunet-service-mesh_tunnel.h
Log:
- use different enum to prevent collisions
Modified: gnunet/src/mesh/gnunet-service-mesh_channel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_channel.c 2013-10-10 13:07:44 UTC
(rev 30089)
+++ gnunet/src/mesh/gnunet-service-mesh_channel.c 2013-10-10 13:27:28 UTC
(rev 30090)
@@ -361,8 +361,6 @@
void
GMCH_add_client (struct MeshChannel *ch, struct MeshClient *c)
{
- struct MeshTunnel3 *t = ch->t;
-
if (NULL != ch->dest)
{
GNUNET_break (0);
@@ -501,11 +499,8 @@
{
struct MeshChannelReliability *rel = cls;
struct MeshReliableMessage *copy;
- struct MeshPeerQueue *q;
struct MeshChannel *ch;
- struct MeshConnection *c;
struct GNUNET_MESH_Data *payload;
- struct MeshPeer *hop;
int fwd;
rel->retry_task = GNUNET_SCHEDULER_NO_TASK;
@@ -1053,7 +1048,6 @@
void
GMCH_send_create (struct MeshChannel *ch)
{
- struct GNUNET_MESH_ChannelMessage msg;
uint32_t opt;
if (NULL == ch->dest)
Modified: gnunet/src/mesh/gnunet-service-mesh_connection.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_connection.c 2013-10-10 13:07:44 UTC
(rev 30089)
+++ gnunet/src/mesh/gnunet-service-mesh_connection.c 2013-10-10 13:27:28 UTC
(rev 30090)
@@ -407,8 +407,8 @@
sizeof (struct GNUNET_MESH_ConnectionACK),
connection, NULL, fwd,
&message_sent, sizeof (struct GNUNET_MESH_ConnectionACK));
- if (MESH_TUNNEL_NEW == t->state)
- GMT_change_state (t, MESH_TUNNEL_WAITING);
+ if (MESH_TUNNEL3_NEW == t->state)
+ GMT_change_state (t, MESH_TUNNEL3_WAITING);
if (MESH_CONNECTION_READY != connection->state)
GMC_change_state (connection, MESH_CONNECTION_SENT);
}
@@ -436,8 +436,8 @@
NULL,
GNUNET_YES);
if (NULL != t &&
- (MESH_TUNNEL_SEARCHING == t->state || MESH_TUNNEL_NEW == t->state))
- tunnel_change_state (t, MESH_TUNNEL_WAITING);
+ (MESH_TUNNEL3_SEARCHING == t->state || MESH_TUNNEL3_NEW == t->state))
+ tunnel_change_state (t, MESH_TUNNEL3_WAITING);
if (MESH_CONNECTION_NEW == connection->state)
connection_change_state (connection, MESH_CONNECTION_SENT);
}
@@ -518,7 +518,7 @@
static void
connection_maintain (struct MeshConnection *c, int fwd)
{
- if (MESH_TUNNEL_SEARCHING == c->t->state)
+ if (MESH_TUNNEL3_SEARCHING == c->t->state)
{
/* TODO DHT GET with RO_BART */
return;
@@ -1086,8 +1086,8 @@
orig_peer->tunnel->peer = orig_peer;
}
GMT_add_connection (orig_peer->tunnel, c);
- if (MESH_TUNNEL_NEW == GMT_get_state (c->t))
- GMT_change_state (c->t, MESH_TUNNEL_WAITING);
+ if (MESH_TUNNEL3_NEW == GMT_get_state (c->t))
+ GMT_change_state (c->t, MESH_TUNNEL3_WAITING);
send_connection_ack (c, GNUNET_NO);
if (MESH_CONNECTION_SENT == c->state)
@@ -1182,7 +1182,7 @@
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " Connection (SYN)ACK for us!\n");
connection_change_state (c, MESH_CONNECTION_READY);
- GMT_change_state (c->t, MESH_TUNNEL_READY);
+ GMT_change_state (c->t, MESH_TUNNEL3_READY);
send_connection_ack (c, GNUNET_YES);
GMT_send_queued_data (c->t, GNUNET_YES);
return GNUNET_OK;
@@ -1193,7 +1193,7 @@
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " Connection ACK for us!\n");
GMC_change_state (c, MESH_CONNECTION_READY);
- GMT_change_state (c->t, MESH_TUNNEL_READY);
+ GMT_change_state (c->t, MESH_TUNNEL3_READY);
GMT_send_queued_data (c->t, GNUNET_NO);
return GNUNET_OK;
}
@@ -2047,7 +2047,7 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, " poll %u\n", ntohl (pmsg->pid));
break;
- case GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY:
+ case GNUNET_MESSAGE_TYPE_MESH_TUNNEL3_DESTROY:
dmsg = (struct GNUNET_MESH_ConnectionDestroy *) data;
dmsg->cid = c->id;
dmsg->reserved = 0;
@@ -2089,7 +2089,7 @@
return;
msg.header.size = htons (sizeof (msg));
- msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY);;
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_TUNNEL3_DESTROY);;
msg.cid = c->id;
LOG (GNUNET_ERROR_TYPE_DEBUG,
" sending connection destroy for connection %s\n",
Modified: gnunet/src/mesh/gnunet-service-mesh_peer.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_peer.c 2013-10-10 13:07:44 UTC (rev
30089)
+++ gnunet/src/mesh/gnunet-service-mesh_peer.c 2013-10-10 13:27:28 UTC (rev
30090)
@@ -920,7 +920,7 @@
if (3 <= connection_count)
return;
- if (peer->tunnel->state == MESH_TUNNEL_SEARCHING)
+ if (peer->tunnel->state == MESH_TUNNEL3_SEARCHING)
{
LOG (GNUNET_ERROR_TYPE_DEBUG, " ... connect!\n");
GMP_connect (peer);
@@ -999,7 +999,7 @@
/* Fill buf */
switch (queue->type)
{
- case GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY:
+ case GNUNET_MESSAGE_TYPE_MESH_TUNNEL3_DESTROY:
case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_DESTROY:
case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_BROKEN:
case GNUNET_MESSAGE_TYPE_MESH_FWD:
@@ -1214,7 +1214,7 @@
switch (queue->type)
{
case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_DESTROY:
- case GNUNET_MESSAGE_TYPE_MESH_TUNNEL_DESTROY:
+ case GNUNET_MESSAGE_TYPE_MESH_TUNNEL3_DESTROY:
LOG (GNUNET_ERROR_TYPE_INFO, "destroying a DESTROY message\n");
GNUNET_break (GNUNET_YES == queue->c->destroy);
/* fall through */
@@ -1584,8 +1584,8 @@
LOG (GNUNET_ERROR_TYPE_DEBUG,
" Starting DHT GET for peer %s\n", peer2s (peer));
peer->search_h = GMD_search (id, &search_handler, peer);
- if (MESH_TUNNEL_NEW == t->state)
- GMT_change_state (t, MESH_TUNNEL_SEARCHING);
+ if (MESH_TUNNEL3_NEW == t->state)
+ GMT_change_state (t, MESH_TUNNEL3_SEARCHING);
}
}
Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2013-10-10 13:07:44 UTC
(rev 30089)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.c 2013-10-10 13:27:28 UTC
(rev 30090)
@@ -202,16 +202,16 @@
switch (s)
{
- case MESH_TUNNEL_NEW:
- return "MESH_TUNNEL_NEW";
- case MESH_TUNNEL_SEARCHING:
- return "MESH_TUNNEL_SEARCHING";
- case MESH_TUNNEL_WAITING:
- return "MESH_TUNNEL_WAITING";
- case MESH_TUNNEL_READY:
- return "MESH_TUNNEL_READY";
- case MESH_TUNNEL_RECONNECTING:
- return "MESH_TUNNEL_RECONNECTING";
+ case MESH_TUNNEL3_NEW:
+ return "MESH_TUNNEL3_NEW";
+ case MESH_TUNNEL3_SEARCHING:
+ return "MESH_TUNNEL3_SEARCHING";
+ case MESH_TUNNEL3_WAITING:
+ return "MESH_TUNNEL3_WAITING";
+ case MESH_TUNNEL3_READY:
+ return "MESH_TUNNEL3_READY";
+ case MESH_TUNNEL3_RECONNECTING:
+ return "MESH_TUNNEL3_RECONNECTING";
default:
sprintf (buf, "%u (UNKNOWN STATE)", s);
@@ -292,7 +292,7 @@
return;
}
- GMT_change_state (t, MESH_TUNNEL_READY);
+ GMT_change_state (t, MESH_TUNNEL3_READY);
GMCH_handle_data (ch, msg, fwd);
}
@@ -502,7 +502,7 @@
memcpy (&tq[1], msg, size);
GNUNET_CONTAINER_DLL_insert_tail (t->tq_head, t->tq_tail, tq);
- if (MESH_TUNNEL_READY == t->state)
+ if (MESH_TUNNEL3_READY == t->state)
GMT_send_queued_data (t, fwd);
}
@@ -632,7 +632,7 @@
GMP_2s (t->peer),
GMT_state2s (state));
t->state = state;
- if (MESH_TUNNEL_READY == state && 3 <= GMT_count_connections (t))
+ if (MESH_TUNNEL3_READY == state && 3 <= GMT_count_connections (t))
{
GMP_stop_search (t->peer);
}
Modified: gnunet/src/mesh/gnunet-service-mesh_tunnel.h
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_tunnel.h 2013-10-10 13:07:44 UTC
(rev 30089)
+++ gnunet/src/mesh/gnunet-service-mesh_tunnel.h 2013-10-10 13:27:28 UTC
(rev 30090)
@@ -48,27 +48,27 @@
/**
* Uninitialized status, should never appear in operation.
*/
- MESH_TUNNEL_NEW,
+ MESH_TUNNEL3_NEW,
/**
* Path to the peer not known yet
*/
- MESH_TUNNEL_SEARCHING,
+ MESH_TUNNEL3_SEARCHING,
/**
* Request sent, not yet answered.
*/
- MESH_TUNNEL_WAITING,
+ MESH_TUNNEL3_WAITING,
/**
* Peer connected and ready to accept data
*/
- MESH_TUNNEL_READY,
+ MESH_TUNNEL3_READY,
/**
* Peer connected previosly but not responding
*/
- MESH_TUNNEL_RECONNECTING
+ MESH_TUNNEL3_RECONNECTING
};
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30090 - gnunet/src/mesh,
gnunet <=