summaryrefslogtreecommitdiff
path: root/serial.c
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2009-07-09 04:23:25 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2009-07-09 04:23:25 +0000
commit7dc4410db5ebe86229de897b00158e12cf31c1e7 (patch)
tree11d77f0ed272fd898a1fd78bcbe8d24418ef9b71 /serial.c
parent3919a33a4c4a561cb7a77a3aed7cd30dc273dff5 (diff)
downloadgpsd-7dc4410db5ebe86229de897b00158e12cf31c1e7.tar.gz
a little bit of handy glue for network transported GNSS data
Diffstat (limited to 'serial.c')
-rw-r--r--serial.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/serial.c b/serial.c
index fcc78149..6a141415 100644
--- a/serial.c
+++ b/serial.c
@@ -219,9 +219,15 @@ int gpsd_open(struct gps_device_t *session)
struct stat sb;
mode_t mode = (mode_t)O_RDWR;
- /* short circuit most of this function if we're reading from the net */
+ /* short circuit most of this function if we're reading from the net
+ * as in the case of gpsd urls. set some nice fake values */
if (session->context->netgnss_service == netgnss_remotegpsd){
session->gpsdata.gps_fd = session->context->dsock;
+ session->saved_baud = 57600;
+ session->gpsdata.baudrate = 57600;
+ session->gpsdata.parity = 'N';
+ session->gpsdata.stopbits = 1;
+ session->context->readonly = 1;
return session->gpsdata.gps_fd;
}
/*@ -boolops -type @*/