projects
/
oweals
/
gnunet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1980c19
)
- use blocks for checking by type results
author
Bart Polot
<bart@net.in.tum.de>
Thu, 21 Jun 2012 15:41:05 +0000
(15:41 +0000)
committer
Bart Polot
<bart@net.in.tum.de>
Thu, 21 Jun 2012 15:41:05 +0000
(15:41 +0000)
src/mesh/gnunet-service-mesh_new.c
patch
|
blob
|
history
diff --git
a/src/mesh/gnunet-service-mesh_new.c
b/src/mesh/gnunet-service-mesh_new.c
index ef3f73f98a86fc353bf447d80397312d80bbd0df..932fbb3b5a0149777077495b0a2058803ee02ee0 100644
(file)
--- a/
src/mesh/gnunet-service-mesh_new.c
+++ b/
src/mesh/gnunet-service-mesh_new.c
@@
-3783,13
+3783,19
@@
dht_get_type_handler (void *cls, struct GNUNET_TIME_Absolute exp,
unsigned int put_path_length, enum GNUNET_BLOCK_Type type,
size_t size, const void *data)
{
unsigned int put_path_length, enum GNUNET_BLOCK_Type type,
size_t size, const void *data)
{
- const struct GNUNET_PeerIdentity *pi = data;
+ const struct PBlock *pb = data;
+ const struct GNUNET_PeerIdentity *pi = &pb->id;
struct MeshTunnel *t = cls;
struct MeshPeerInfo *peer_info;
struct MeshPeerPath *p;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "got type DHT result!\n");
struct MeshTunnel *t = cls;
struct MeshPeerInfo *peer_info;
struct MeshPeerPath *p;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "got type DHT result!\n");
- if (size != sizeof (struct GNUNET_PeerIdentity))
+ if (size != sizeof (struct PBlock))
+ {
+ GNUNET_break_op (0);
+ return;
+ }
+ if (ntohl(pb->type) != t->type)
{
GNUNET_break_op (0);
return;
{
GNUNET_break_op (0);
return;