summaryrefslogtreecommitdiff
path: root/netlib.c
Commit message (Collapse)AuthorAgeFilesLines
* Suppress compiler warnings and do splint cleanup. All regression tests pass.Eric S. Raymond2012-04-201-1/+1
|
* Removed duplicate code.Michael Tatarinov2011-06-271-2/+2
| | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* netlib_localsocket(): close the socket if connect() failedMichael Tatarinov2011-06-271-0/+1
| | | | Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
* Factor out a function we'll probably reuse.Eric S. Raymond2011-06-261-0/+27
|
* Guard a potentially fatal call better. All regression tests pass.Eric S. Raymond2011-02-021-2/+3
|
* More deheader testing. All regression tests pass.Eric S. Raymond2011-01-131-1/+0
|
* More header portability audting with a new version of deheader.Eric S. Raymond2010-12-221-2/+2
|
* Abolish gpsd_report.c. No more hardwired logging from the client libraries.Eric S. Raymond2010-12-161-4/+1
| | | | Only the daemon now uses this function.
* Refactor to turf all uses of gpsd_report() out of netlib.cEric S. Raymond2010-12-161-3/+0
| | | | | | A recent bug report makes it clear that all such uses have to be removed from the client libraries. Otherwise a GUI client might dummp log messages uselessly in the X session error log. This is a start.
* Splint cleanup.Eric S. Raymond2010-12-151-3/+1
|
* Remove duplicate header.Eric S. Raymond2010-12-151-1/+0
|
* Lift some buried #includes. All regression tests pass.Eric S. Raymond2010-12-151-0/+11
|
* Partial splint cleanup. All regression tests pass.Eric S. Raymond2010-12-151-3/+3
|
* missing headers for openbsdChris Kuethe2010-12-141-0/+1
|
* Taking SuS seriously some more.Eric S. Raymond2010-12-141-31/+2
|
* Unused-header removals by deheader. All regression tests pass.Eric S. Raymond2010-12-011-1/+0
|
* splint cleanup. All regression tests pass.Eric S. Raymond2010-09-161-1/+1
|
* Switch TCP socket sources to nonblocking mode.Eric S. Raymond2010-09-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This follows a suggestion from Christian Eddie Dost <ecd@brainaid.de>, who had this to say: However, gpsd hangs when used with a tcp:// device, if you start the device without waiting for clients (-n option), there will never be a client connection accepted. If you start gpsd without -n option one client will be accepted and receive data, but when closing the client connection there will be no new connection possible. The problem is gpsd hangs inside consume_packets() or more exactly inside a blocking read() on the tcp socket a few functions further down. consume_packets() never returns to the main select() loop. The following patch configures sockets to non blocking, this fixes the problem and gpsd works fine for me with tcp:// devices. Using this patch should allow the special udp handling at the end of the function consume_packets() to be removed. I applied the suggested patch and also removed the special UDP handing. All regressions test pass (including the UDP one), and gpsd -N tcp://data.aishub.net:4006 reads AIS data as expected.
* Prevent an unlikely (but possible) fd leak. All regression tests pass, code ↵Eric S. Raymond2010-04-281-4/+5
| | | | splints clean.
* A long step towards reading UDP packets.Eric S. Raymond2010-04-281-3/+18
|
* Reindent the network support. All regression tests pass.Eric S. Raymond2010-04-141-34/+46
|
* Add all our info on the spin bug to TODO, and instrument all opens/closes.Eric S. Raymond2010-04-061-1/+5
|
* Add configure switch to enable/disable IPv6 support.Eric S. Raymond2010-03-271-2/+2
| | | | | | Patch by Signed-off-by: esr@thyrsus.com
* Vanish away Id and Rev $ keywords, git won't expand them to anything useful.Eric S. Raymond2010-03-131-2/+1
|
* Copyright stamps everywhere. No code changes.Eric S. Raymond2010-03-111-1/+5
|
* Na,espace cleanup. All regression tests pass, codebase splints clean.Eric S. Raymond2010-01-131-1/+1
|
* splint cleanup of IPv6 support.Eric S. Raymond2010-01-121-8/+20
|
* Internal IPv6 support, derived from a support patch by Olivier Mehani.Eric S. Raymond2010-01-121-35/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | The patch original is at: https://lists.berlios.de/pipermail/gpsd-dev/attachments/20100111/85ad4e15/attachment.bin This revision changes netlib_connectsock() to take a first argument that is an address family and can specify IPv4, IPv6, or either. It also changes gpsd.c to open two client sockets, one IPv4 and one IPv6, and listen on both. As a required cleanup, a number of defaults to "127.0.0.1" become defaults to "localhost" so we're not hardwiring in IPv4 assumptions anymore. I've omitted a significant portion of the Mehani patch that changed the interface of the client library in an incompatible way. Currently there is no way to make gpsd listen to IPv4 or IPv6 only, and no way to make a client query over IPV4 or IPv6 only. Also, we'd really like to be able to condition out IPv6 or (someday) IPv4 support for a leaner runtime, and there's no way to do that yet, either. Under IPv4, regression tests pass; live operation with a GPS mouse and the aishub feed both work. However, the resulting code does not splint clean; this will need to be fixed, and that's going to be tricky due to the new sockaddr_t struct.
* David Ludlow's housekeeping and type-cleanup patch.Eric S. Raymond2010-01-021-3/+7
| | | | All regression tests pass,
* Declare socket-valued ints as socket_t.Eric S. Raymond2009-12-311-2/+3
|
* Include the whole config file in gpsd.h.Eric S. Raymond2009-11-201-0/+2
| | | | | | | That is, instead of sectioning out two little config defines and putting them in. This makes gpsd.h self-copntained (e.g. in case it gets installed as a library header) and means we can get rid of most inclusions of it.
* Fix some whitespace glitches found while experimenting with indent(1).Eric S. Raymond2009-11-171-1/+1
| | | | All regression tests pass.
* Correct some splint annotations.Eric S. Raymond2009-09-111-0/+2
| | | | | The codebase now splints completely clean - no errors, no warnings, no splint croaking on include files it can't handle.
* Finally found the right set of exclusions to stop splint from choking.Eric S. Raymond2009-09-111-4/+4
| | | | Now to see if I can trim them any.
* Guard some inclusions that splint doesn't like. Eric S. Raymond2009-09-101-0/+2
| | | | No effect on compilation. All regression tests pass.
* Partial splint cleanup. All regression tests pass.Eric S. Raymond2009-09-091-7/+7
|
* Add gps_errstr() to the client API so client code doesn't have toEric S. Raymond2009-08-261-0/+13
| | | | reinvent it all the time. Use it in gpsmon.
* system call failure should be tested against -1, rather than "< 0"Chris Kuethe2009-07-091-2/+2
|
* Splint cleanup and removal of some unneeded headers.Eric S. Raymond2009-01-211-0/+2
|
* C syntax fix...Chris Kuethe2008-08-181-0/+2
| | | | | ...work around declarations after statements by putting this inside its own scope. pacifies gcc2...
* Don't die if getprotobyname fails. Patch from Ulf Lamping on gpsd-devChris Kuethe2007-10-181-9/+13
|
* More splint cleanups.Eric S. Raymond2007-06-021-2/+4
| | | | | | There is a remote possibility the packet.c patch could change the behavior of the TSIP driver, but I think the code was just broken -- see the dangling else in the "before" part of the diff.
* splint cleanups, and move a static to wre it belongs in the driver structure.Eric S. Raymond2007-06-011-0/+2
|
* Change return ttype of gpsd_write to be what the Garmin driver was expecting;Eric S. Raymond2007-06-011-0/+2
| | | | | it actually makes more sense this way. (Fixes what may have been a subtle bug.)
* splint cleanups, including a tweak to Makefile.am...Eric S. Raymond2007-05-311-2/+2
| | | | | | ...to make sure that gpsd.h is always regenerated when splint or other tools want to see C sources.
* generic function to get the ip of the client, as a string.Chris Kuethe2007-04-141-0/+17
|
* make this compile again on linux. Chris Kuethe2007-01-221-1/+1
| | | | | all the #if HAVE_something tests depend on definitions from gpsd_config.h, which depends on definitions from sys/types.h.
* Add support for setting IP TOS and TCP options to reduce transit delay. Chris Kuethe2007-01-221-2/+21
| | | | This may be useful on congested networks
* Rename config.h so it can be installed as gpsd_config.h...Chris Kuethe2006-10-261-3/+4
| | | | | | ...for those who want to build their own apps linked against libgps and want the headers to work. Works on OpenBSD, tested by Jeff Francis on OS X and Linux
* Add subversion ID tags near the beginning of every file.Chris Kuethe2006-09-211-0/+1
| | | | First line where possible, second line for scripts called with #!