[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r29873 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r29873 - gnunet/src/mesh |
Date: |
Sat, 5 Oct 2013 20:49:24 +0200 |
Author: grothoff
Date: 2013-10-05 20:49:24 +0200 (Sat, 05 Oct 2013)
New Revision: 29873
Modified:
gnunet/src/mesh/mesh_api.c
Log:
-fix getting peer identity via mesh_get_info
Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c 2013-10-05 18:38:41 UTC (rev 29872)
+++ gnunet/src/mesh/mesh_api.c 2013-10-05 18:49:24 UTC (rev 29873)
@@ -281,6 +281,8 @@
*/
GNUNET_PEER_Id peer;
+ struct GNUNET_PeerIdentity pid;
+
/**
* Any data the caller wants to put in here
*/
@@ -731,6 +733,7 @@
tmsg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage));
tmsg.tunnel_id = htonl (t->tid);
tmsg.port = htonl (t->port);
+ t->pid = tmsg.peer;
GNUNET_PEER_resolve (t->peer, &tmsg.peer);
options = 0;
@@ -814,6 +817,7 @@
t = create_tunnel (h, tid);
t->allow_send = GNUNET_NO;
t->peer = GNUNET_PEER_intern (&msg->peer);
+ t->pid = msg->peer;
t->mesh = h;
t->tid = tid;
t->port = port;
@@ -1455,6 +1459,7 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, " number %X\n", t->tid);
t->ctx = tunnel_ctx;
t->peer = GNUNET_PEER_intern (peer);
+ t->pid = *peer;
msg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
msg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage));
msg.tunnel_id = htonl (t->tid);
@@ -1538,7 +1543,7 @@
ret = (const union GNUNET_MESH_TunnelInfo *) &tunnel->ooorder;
break;
case GNUNET_MESH_OPTION_PEER:
- ret = (const union GNUNET_MESH_TunnelInfo *) &tunnel->peer;
+ ret = (const union GNUNET_MESH_TunnelInfo *) &tunnel->pid;
break;
default:
GNUNET_break (0);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r29873 - gnunet/src/mesh,
gnunet <=