From 8d052ecf24849a13f3d8bc6c723ebc7005785825 Mon Sep 17 00:00:00 2001 From: likewise Date: Mon, 12 Jul 2004 20:42:16 +0000 Subject: [PATCH] Source documentation added. --- doc/contrib.txt | 2 +- src/api/tcpip.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/contrib.txt b/doc/contrib.txt index 00fffa65..8620e751 100644 --- a/doc/contrib.txt +++ b/doc/contrib.txt @@ -6,7 +6,7 @@ in lwIP development. 2 How to contribute to lwIP Here is a short list of suggestions to anybody working with lwIP and -trying to contribute bugreports, fixes, enhancements, platform ports etc. +trying to contribute bug reports, fixes, enhancements, platform ports etc. First of all as you may already know lwIP is a volunteer project so feedback to fixes or questions might often come late. Hopefully the bug and patch tracking features of Savannah help us not lose users' input. diff --git a/src/api/tcpip.c b/src/api/tcpip.c index bdd35932..622d8b5d 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -56,19 +56,25 @@ tcpip_tcp_timer(void *arg) { (void)arg; + /* call TCP timer handler */ tcp_tmr(); + /* timer still needed? */ if (tcp_active_pcbs || tcp_tw_pcbs) { + /* restart timer */ sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); } else { - tcpip_tcp_timer_active = 0; + /* disable timer */ + tcpip_tcp_timer_active = 0; } } void tcp_timer_needed(void) { + /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { - tcpip_tcp_timer_active = 1; + /* enable and start timer */ + tcpip_tcp_timer_active = 1; sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); } }