diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-02-02 14:54:21 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-02-02 14:54:21 -0500 |
commit | 0113c042a1eb3080eb4e1b73c0db8234250d996a (patch) | |
tree | b400a73552603830d8c6b5e6c790e56d3edaa8b4 /libgpsmm.cpp | |
parent | 0a1b13f791a6fa0965207deb44c3c67ff3deaf23 (diff) | |
download | gpsd-0113c042a1eb3080eb4e1b73c0db8234250d996a.tar.gz |
Rebuild the C++ interface to use RAII.
Simplifies the code and invalidates Berlios ug #17778: crash in libgpsmm.
Diffstat (limited to 'libgpsmm.cpp')
-rw-r--r-- | libgpsmm.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/libgpsmm.cpp b/libgpsmm.cpp index 9e3d050b..f7d2354b 100644 --- a/libgpsmm.cpp +++ b/libgpsmm.cpp @@ -11,16 +11,7 @@ #include "libgpsmm.h" -gpsmm::gpsmm() : to_user(0) -{ -} - -struct gps_data_t* gpsmm::open(void) -{ - return open("localhost",DEFAULT_GPSD_PORT); -} - -struct gps_data_t* gpsmm::open(const char *host, const char *port) +struct gps_data_t* gpsmm::gps_inner_open(const char *host, const char *port) { const bool err = (gps_open(host, port, gps_data()) != 0); if ( err ) { @@ -65,11 +56,6 @@ struct gps_data_t* gpsmm::read(void) } } -int gpsmm::close(void) -{ - return gps_close(gps_data()); -} - bool gpsmm::waiting(void) { return gps_waiting(gps_data()); |