X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol.c;h=0d58d6a8e8ad7d53146431eb04466ac5d4236d54;hp=dad7ccb66b04b6f6c8da0cb674b3cc0dc5b4dcee;hb=e220187f484f3549df3ad3a04939b9a38051d1a0;hpb=83263b74460656ba557fd9bb84dc27258549e9cd diff --git a/src/protocol.c b/src/protocol.c index dad7ccb6..0d58d6a8 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: protocol.c,v 1.28.4.143 2003/07/24 12:08:15 guus Exp $ + $Id: protocol.c,v 1.28.4.146 2003/08/03 12:38:43 guus Exp $ */ #include "system.h" @@ -207,15 +207,14 @@ void exit_requests(void) avl_delete_tree(past_request_tree); } -bool seen_request(const char *request) +bool seen_request(char *request) { - past_request_t p = { - .request = request, - }; - past_request_t *new; + past_request_t *new, p = {0}; cp(); + p.request = request; + if(avl_search(past_request_tree, &p)) { ifdebug(SCARY_THINGS) logger(LOG_DEBUG, _("Already seen request")); return true; @@ -247,6 +246,6 @@ void age_past_requests(void) } if(left || deleted) - ifdebug(SCARY_THINGS) logger(LOG_DEBUG, _("Aging past requests: deleted %d, left %d\n"), + ifdebug(SCARY_THINGS) logger(LOG_DEBUG, _("Aging past requests: deleted %d, left %d"), deleted, left); }