[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 09/09: fix: BOX at @ not working
From: |
gnunet |
Subject: |
[gnunet] 09/09: fix: BOX at @ not working |
Date: |
Fri, 01 Dec 2023 10:26:56 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit 0d77fac87aba598ba53cf4d0606a1a26786e2186
Author: Sebastian Nadler <sebastian.nadler@tum.de>
AuthorDate: Thu Nov 30 19:38:58 2023 +0100
fix: BOX at @ not working
---
src/service/gns/gnunet-service-gns_resolver.c | 49 ++++++++++++++++-----------
1 file changed, 30 insertions(+), 19 deletions(-)
diff --git a/src/service/gns/gnunet-service-gns_resolver.c
b/src/service/gns/gnunet-service-gns_resolver.c
index 3f21a3b8c..d9cdbd60e 100644
--- a/src/service/gns/gnunet-service-gns_resolver.c
+++ b/src/service/gns/gnunet-service-gns_resolver.c
@@ -581,14 +581,16 @@ timeout_resolution (void *cls)
/**
* Function called to receive the protocol number for a service.
- *
+ *
* @param name name of the protocol
*/
static struct protoent *
-resolver_getprotobyname(const char *name) {
- struct protoent *pe = getprotobyname(name);
- if (pe == NULL && strcmp(name, "trust") == 0) {
- pe = GNUNET_new(struct protoent);
+resolver_getprotobyname (const char *name)
+{
+ struct protoent *pe = getprotobyname (name);
+ if (pe == NULL && strcmp (name, "trust") == 0)
+ {
+ pe = GNUNET_new (struct protoent);
pe->p_name = "trust";
pe->p_proto = 242;
}
@@ -598,21 +600,27 @@ resolver_getprotobyname(const char *name) {
/**
* Function called to receive the port number for a service.
- *
+ *
* @param name name of the service
* @param proto name of the protocol
*/
-static struct servent *resolver_getservbyname(const char *name, const char
*proto){
- struct servent *se = getservbyname(name, proto);
- if (se == NULL && strcmp(proto, "trust") == 0) {
- if (strcmp(name, "trustlist") == 0) {
- se = GNUNET_new(struct servent);
+static struct servent *
+resolver_getservbyname (const char *name, const char *proto)
+{
+ struct servent *se = getservbyname (name, proto);
+ if (se == NULL && strcmp (proto, "trust") == 0)
+ {
+ if (strcmp (name, "trustlist") == 0)
+ {
+ se = GNUNET_new (struct servent);
se->s_name = "trustlist";
- se->s_port = htons(1002);
- } else if (strcmp(name, "scheme") == 0) {
- se = GNUNET_new(struct servent);
+ se->s_port = htons (1002);
+ }
+ else if (strcmp (name, "scheme") == 0)
+ {
+ se = GNUNET_new (struct servent);
se->s_name = "scheme";
- se->s_port = htons(1003);
+ se->s_port = htons (1003);
}
}
return se;
@@ -713,7 +721,7 @@ resolver_lookup_get_next_label (struct GNS_ResolverHandle
*rh)
return ret;
}
se = resolver_getservbyname (srv_name,
- proto_name);
+ proto_name);
if (NULL == se)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -1125,7 +1133,7 @@ dns_result_parser (void *cls,
rd[i - skip].data_size = buf_off - buf_start;
rd[i - skip].data = &buf[buf_start];
break;
-
+
case GNUNET_DNSPARSER_TYPE_URI:
buf_start = buf_off;
if (GNUNET_OK !=
@@ -2046,7 +2054,10 @@ handle_gns_resolution_result (void *cls,
if ((0 != rh->protocol) &&
(0 != rh->service) &&
(GNUNET_GNSRECORD_TYPE_BOX != rd[i].record_type))
- continue; /* we _only_ care about boxed records */
+ if (GNUNET_GNSRECORD_TYPE_PKEY != rd[i].record_type &&
+ GNUNET_GNSRECORD_TYPE_EDKEY != rd[i].record_type)
+ continue;
+ /* we _only_ care about boxed records */
GNUNET_assert (rd_off < rd_count);
rd_new[rd_off] = rd[i];
@@ -2238,7 +2249,7 @@ handle_gns_resolution_result (void *cls,
(off != rd[i].data_size))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _ ("Failed to deserialize URI record with target\n"));
+ _ ("Failed to deserialize URI record with target\n"));
GNUNET_break_op (0); /* record not well-formed */
}
else
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] branch master updated (aa8979eac -> 0d77fac87), gnunet, 2023/12/01
- [gnunet] 04/09: LIGHTEST service & protocol box checks, gnunet, 2023/12/01
- [gnunet] 02/09: URI RR fix, gnunet, 2023/12/01
- [gnunet] 01/09: URI & SMIMEA DNS RR, gnunet, 2023/12/01
- [gnunet] 06/09: Refactored service and protocol resolution in GNS resolver, gnunet, 2023/12/01
- [gnunet] 03/09: URI RR fix, gnunet, 2023/12/01
- [gnunet] 07/09: Fix URI record serialization issue, gnunet, 2023/12/01
- [gnunet] 09/09: fix: BOX at @ not working,
gnunet <=
- [gnunet] 05/09: BOX record namestore test, gnunet, 2023/12/01
- [gnunet] 08/09: test_gns_lightest.sh for lightest lookup tests, gnunet, 2023/12/01