summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2007-03-26 15:18:27 +0000
committerEric S. Raymond <esr@thyrsus.com>2007-03-26 15:18:27 +0000
commit94bf2cdf46543eec46c326dfa68a525c4f14a342 (patch)
tree109faa2bee82ca366a0b018be1956a9cdeb42b5c
parent167df4e203172e6810020531cbf7b1b2e5e8ed8d (diff)
downloadgpsd-94bf2cdf46543eec46c326dfa68a525c4f14a342.tar.gz
First step of a layering fix: move the private ldisc member to gpsd.h.
-rw-r--r--drivers.c4
-rw-r--r--gps.h3
-rw-r--r--gpsd.h3
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers.c b/drivers.c
index 76b9a09f..4ba72dc7 100644
--- a/drivers.c
+++ b/drivers.c
@@ -94,7 +94,7 @@ gps_mask_t nmea_parse_input(struct gps_device_t *session)
gpsd_report(LOG_WARN, "unknown sentence: \"%s\"\n", session->packet.outbuffer);
}
#ifdef NMEADISC
- if (session->gpsdata.ldisc == 0) {
+d if (session->ldisc == 0) {
uid_t old;
int ldisc = NMEADISC;
@@ -124,7 +124,7 @@ gps_mask_t nmea_parse_input(struct gps_device_t *session)
else
gpsd_report(LOG_WARN, "activated nmea discipline\n");
/* this is a flag that shows if we've tried the setup */
- session->gpsdata.ldisc = NMEADISC;
+ session->ldisc = NMEADISC;
if (old){
gpsd_report(LOG_WARN, "giving up euid 0\n");
diff --git a/gps.h b/gps.h
index 4438a3ef..354db889 100644
--- a/gps.h
+++ b/gps.h
@@ -296,9 +296,6 @@ struct gps_data_t {
/* these members are private */
int gps_fd; /* socket or file descriptor to GPS */
-#ifdef NMEADISC
- int ldisc; /* current line discipline */
-#endif
void (*raw_hook)(struct gps_data_t *, char *, size_t len, int level);/* Raw-mode hook for GPS data. */
void (*thread_hook)(struct gps_data_t *, char *, size_t len, int level);/* Thread-callback hook for GPS data. */
};
diff --git a/gpsd.h b/gpsd.h
index f04ae6d0..9d68b504 100644
--- a/gpsd.h
+++ b/gpsd.h
@@ -230,6 +230,9 @@ struct gps_device_t {
#endif /* NTPSHM_ENABLE */
double mag_var; /* Magnetic variation in degrees */
bool back_to_nmea; /* back to NMEA on revert? */
+#ifdef NMEADISC
+ int ldisc; /* current line discipline */
+#endif
/*
* The rest of this structure is driver-specific private storage.
* Because the Garmin driver uses a long buffer, you can have