diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-09-11 18:21:57 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-09-11 18:21:57 +0000 |
commit | 163c619378cab13dce25ab7c933aee34749353ab (patch) | |
tree | 54a0887ddef8d5b19ecc461234ae4e363fac24eb /nuttx/netutils/thttpd/thttpd.c | |
parent | a1ec4b2084e0de5cc55f5c6847a13804bf5dc451 (diff) | |
download | px4-nuttx-163c619378cab13dce25ab7c933aee34749353ab.tar.gz px4-nuttx-163c619378cab13dce25ab7c933aee34749353ab.tar.bz2 px4-nuttx-163c619378cab13dce25ab7c933aee34749353ab.zip |
Clean up THTTPD watch handling
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2036 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/netutils/thttpd/thttpd.c')
-rw-r--r-- | nuttx/netutils/thttpd/thttpd.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/nuttx/netutils/thttpd/thttpd.c b/nuttx/netutils/thttpd/thttpd.c index 224ccd1af..b1e90b6c7 100644 --- a/nuttx/netutils/thttpd/thttpd.c +++ b/nuttx/netutils/thttpd/thttpd.c @@ -565,8 +565,7 @@ static void clear_connection(struct connect_s *conn, struct timeval *tv) conn->linger_timer = NULL; conn->hc->should_linger = FALSE; } - - if (conn->hc->should_linger) + else if (conn->hc->should_linger) { fdwatch_del_fd(fw, conn->hc->conn_fd); conn->conn_state = CNST_LINGERING; @@ -893,14 +892,7 @@ int thttpd_main(int argc, char **argv) if (conn) { hc = conn->hc; - if (!fdwatch_check_fd(fw, hc->conn_fd)) - { - /* Something went wrong */ - - nvdbg("Clearing connection\n"); - clear_connection(conn, &tv); - } - else + if (fdwatch_check_fd(fw, hc->conn_fd)) { nvdbg("Handle conn_state %d\n", conn->conn_state); switch (conn->conn_state) |