From 483a6cc161447bf94068ffaad463a9c7ee88d30d Mon Sep 17 00:00:00 2001 From: "Coren[m]" Date: Fri, 27 Sep 2013 19:50:42 +0200 Subject: [PATCH] Logging loop corrected. --- toxcore/Messenger.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 8ad15bc1..36e10fb9 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -1300,7 +1300,9 @@ void doMessenger(Messenger *m) #ifdef CLIENT_ONETOONE_IP assoc = &cptr->assoc; #else - for (assoc = &cptr->assoc4; assoc != &cptr->assoc6; assoc = &cptr->assoc6) + uint32_t a; + + for (a = 0, assoc = &cptr->assoc4; a < 2; a++, assoc = &cptr->assoc6) #endif if (ip_isset(&assoc->ip_port.ip)) { last_pinged = lastdump - assoc->last_pinged; @@ -1359,7 +1361,9 @@ void doMessenger(Messenger *m) #ifdef CLIENT_ONETOONE_IP assoc = &cptr->assoc; #else - for (assoc = &cptr->assoc4; assoc != &cptr->assoc6; assoc = &cptr->assoc6) + uint32_t a; + + for (a = 0, assoc = &cptr->assoc4; a < 2; a++, assoc = &cptr->assoc6) #endif if (ip_isset(&assoc->ip_port.ip)) { last_pinged = lastdump - assoc->last_pinged;