summaryrefslogtreecommitdiff
path: root/libgpsmm.cpp
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-07-13 23:09:21 -0400
committerEric S. Raymond <esr@thyrsus.com>2010-07-13 23:09:21 -0400
commit4361766f80dda14f2f6d47184824032d33035695 (patch)
tree8e6bd11c621b64966f0a72d45727fa4ece23114b /libgpsmm.cpp
parenta9db64513a4bfcdfebf0483a1d82e8d411a8f2f3 (diff)
downloadgpsd-4361766f80dda14f2f6d47184824032d33035695.tar.gz
First round of changes for API major version 5:
* gps_open() becomes reentrant, what gps_open_r() used to be. * gps_poll() is removed in favor of gps_read().
Diffstat (limited to 'libgpsmm.cpp')
-rw-r--r--libgpsmm.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgpsmm.cpp b/libgpsmm.cpp
index 45c70163..c1e5391f 100644
--- a/libgpsmm.cpp
+++ b/libgpsmm.cpp
@@ -17,7 +17,7 @@ struct gps_data_t* gpsmm::open(void) {
}
struct gps_data_t* gpsmm::open(const char *host, const char *port) {
- gps_data=gps_open(host,port);
+ gps_open(host,port, gps_data);
if (gps_data==NULL) { //connection not opened
return NULL;
}
@@ -46,7 +46,7 @@ struct gps_data_t* gpsmm::send(const char *request) {
}
struct gps_data_t* gpsmm::poll(void) {
- if (gps_poll(gps_data)<0) {
+ if (gps_read(gps_data)<=0) {
// we return null if there was a read() error or connection is cloed by gpsd
return NULL;
}