[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 04/08: handle case where resolver operation is can
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 04/08: handle case where resolver operation is cancelled during success callback |
Date: |
Sat, 03 Mar 2018 22:42:49 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit cd2b8b467b218dfdd2d5124ad2d835161f3a2b1a
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Mar 3 21:56:15 2018 +0100
handle case where resolver operation is cancelled during success callback
---
src/util/resolver_api.c | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c
index bd46b4fbb..b92fd6a02 100644
--- a/src/util/resolver_api.c
+++ b/src/util/resolver_api.c
@@ -500,11 +500,13 @@ handle_response (void *cls,
GNUNET_free (nret);
}
/* finally, make termination call */
- rh->name_callback (rh->cls,
- NULL);
+ if (GNUNET_SYSERR != rh->was_transmitted)
+ rh->name_callback (rh->cls,
+ NULL);
}
- if (NULL != rh->addr_callback)
- rh->addr_callback (rh->cls,
+ if ( (NULL != rh->addr_callback) &&
+ (GNUNET_SYSERR != rh->was_transmitted) )
+ rh->addr_callback (rh->cls,
NULL,
0);
}
@@ -637,6 +639,7 @@ numeric_resolution (void *cls)
(const struct sockaddr *) &v4,
sizeof (v4));
if ( (rh->af == AF_UNSPEC) &&
+ (GNUNET_SYSERR != rh->was_transmitted) &&
(1 == inet_pton (AF_INET6,
hostname,
&v6.sin6_addr)) )
@@ -646,9 +649,10 @@ numeric_resolution (void *cls)
(const struct sockaddr *) &v6,
sizeof (v6));
}
- rh->addr_callback (rh->cls,
- NULL,
- 0);
+ if (GNUNET_SYSERR != rh->was_transmitted)
+ rh->addr_callback (rh->cls,
+ NULL,
+ 0);
GNUNET_free (rh);
return;
}
@@ -661,9 +665,10 @@ numeric_resolution (void *cls)
rh->addr_callback (rh->cls,
(const struct sockaddr *) &v6,
sizeof (v6));
- rh->addr_callback (rh->cls,
- NULL,
- 0);
+ if (GNUNET_SYSERR != rh->was_transmitted)
+ rh->addr_callback (rh->cls,
+ NULL,
+ 0);
GNUNET_free (rh);
return;
}
@@ -725,9 +730,10 @@ loopback_resolution (void *cls)
GNUNET_break (0);
break;
}
- rh->addr_callback (rh->cls,
- NULL,
- 0);
+ if (GNUNET_SYSERR != rh->was_transmitted)
+ rh->addr_callback (rh->cls,
+ NULL,
+ 0);
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Finished resolving hostname `%s'.\n",
(const char *) &rh[1]);
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (74ccb6cad -> 1f46cd730), gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 01/08: fix newline, reduce verbosity, gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 02/08: add pin zone, remove obsolete script, gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 04/08: handle case where resolver operation is cancelled during success callback,
gnunet <=
- [GNUnet-SVN] [gnunet] 03/08: fix logging, gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 08/08: update developer manual to match GNS changes, gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 07/08: update NSS plugin to hijack non-gnu/zkey tlds as well, gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 06/08: update user-documentation to match new implementation, gnunet, 2018/03/03
- [GNUnet-SVN] [gnunet] 05/08: eliminate .gnu from GNS, gnunet, 2018/03/03