From 5abc996a88e454706234656986506aba58b530ab Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 6 Apr 2010 22:21:39 -0400 Subject: Add all our info on the spin bug to TODO, and instrument all opens/closes. --- netlib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'netlib.c') diff --git a/netlib.c b/netlib.c index 1571a53d..8a5b6abf 100644 --- a/netlib.c +++ b/netlib.c @@ -95,8 +95,10 @@ socket_t netlib_connectsock(int af, const char *host, const char *service, const break; } - if (s > 0) + if (s > 0) { + gpsd_report(LOG_SPIN, "close(%d) in netlib_connectsock()\n", s); (void)close(s); + } } /*@+type@*/ #ifndef S_SPLINT_S @@ -117,6 +119,8 @@ socket_t netlib_connectsock(int af, const char *host, const char *service, const if (type == SOCK_STREAM) setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *)&one, sizeof one); #endif + + gpsd_report(LOG_SPIN, "netlib_connectsock() returns socket on fd %d\n", s); return s; /*@ +type +mustfreefresh @*/ } -- cgit v1.2.1