diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-10-25 12:59:41 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-10-25 12:59:41 +0000 |
commit | 64a061d90ded1dc913e3c8186dba11bfca9aff9e (patch) | |
tree | f55dc91c945f33817fd8649d408ab757dc229cdb /src/namestore/namestore_api.c | |
parent | b596994ef30cb2b2b797654108ddcca331245da0 (diff) | |
download | gnunet-64a061d90ded1dc913e3c8186dba11bfca9aff9e.tar.gz gnunet-64a061d90ded1dc913e3c8186dba11bfca9aff9e.zip |
- clean protocol number
- added lookup protocol numbers
- implemented lookup sending
Diffstat (limited to 'src/namestore/namestore_api.c')
-rw-r--r-- | src/namestore/namestore_api.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index 8d3ea16dd..9d290fca2 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -1022,11 +1022,12 @@ GNUNET_NAMESTORE_records_lookup (struct GNUNET_NAMESTORE_Handle *h, | |||
1022 | pe = GNUNET_malloc (sizeof (struct PendingMessage) + msg_size); | 1022 | pe = GNUNET_malloc (sizeof (struct PendingMessage) + msg_size); |
1023 | pe->size = msg_size; | 1023 | pe->size = msg_size; |
1024 | msg = (struct LabelLookupMessage *) &pe[1]; | 1024 | msg = (struct LabelLookupMessage *) &pe[1]; |
1025 | msg->gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_LABEL_LOOKUP); | 1025 | msg->gns_header.header.type = htons (GNUNET_MESSAGE_TYPE_NAMESTORE_RECORD_LOOKUP); |
1026 | msg->gns_header.header.size = htons (msg_size); | 1026 | msg->gns_header.header.size = htons (msg_size); |
1027 | msg->gns_header.r_id = htonl (qe->op_id); | 1027 | msg->gns_header.r_id = htonl (qe->op_id); |
1028 | msg->zone = *pkey; | 1028 | msg->zone = *pkey; |
1029 | msg->label_len = htons(label_len); | 1029 | msg->label_len = htons(label_len); |
1030 | memcpy (&msg[1], label, label_len); | ||
1030 | 1031 | ||
1031 | /* transmit message */ | 1032 | /* transmit message */ |
1032 | GNUNET_CONTAINER_DLL_insert_tail (h->pending_head, h->pending_tail, pe); | 1033 | GNUNET_CONTAINER_DLL_insert_tail (h->pending_head, h->pending_tail, pe); |