X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol.c;h=0d58d6a8e8ad7d53146431eb04466ac5d4236d54;hp=c2d928987adadb9242b5ec9de8b6190c0635f6e4;hb=9bde92ce97d5503ff2d31dcc6f0648902580ec14;hpb=714fb32d0377ed9f5643ed8f0bd914843d12266b diff --git a/src/protocol.c b/src/protocol.c index c2d92898..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.144 2003/07/29 10:50:15 guus Exp $ + $Id: protocol.c,v 1.28.4.146 2003/08/03 12:38:43 guus Exp $ */ #include "system.h" @@ -209,13 +209,12 @@ void exit_requests(void) 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); }