summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-07-25 13:34:33 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-07-25 13:34:33 +0000
commit2e632cb9845270c0a382413c09df6b61154193f8 (patch)
treea4ee15e943c44b46bffd17b7cc932e8cfc05e67e /gpsd.c
parent056eaeb7720e1231eba92eea90795c5520de3a13 (diff)
downloadgpsd-2e632cb9845270c0a382413c09df6b61154193f8.tar.gz
Further separate old-style from new-style code.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gpsd.c b/gpsd.c
index 5d3456f5..fada903a 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1928,13 +1928,19 @@ int main(int argc, char *argv[])
for (sub = subscribers; sub < subscribers + MAXSUBSCRIBERS; sub++) {
/* some listeners may be in watcher mode */
if (sub->watcher) {
- char cmds[4] = "";
channel->poll_times[sub - subscribers] = timestamp();
if (changed &~ ONLINE_SET) {
+#ifdef OLDSTYLE_ENABLE
+ char cmds[4] = "";
if (changed & (LATLON_SET | MODE_SET))
(void)strlcat(cmds, "o", 4);
if (changed & SATELLITE_SET)
(void)strlcat(cmds, "y", 4);
+ if (channel->gpsdata.profiling!=0)
+ (void)strlcat(cmds, "$", 4);
+ if (cmds[0] != '\0')
+ (void)handle_oldstyle(sub, cmds, (int)strlen(cmds));
+#endif /* OLDSTYLE_ENABLE */
#ifdef AIVDM_ENABLE
if ((changed & AIS_SET) != 0) {
char buf2[BUFSIZ];
@@ -1943,11 +1949,7 @@ int main(int argc, char *argv[])
(void)throttled_write(sub, buf2, strlen(buf2));
}
#endif /* AIVDM_ENABLE */
- if (channel->gpsdata.profiling!=0)
- (void)strlcat(cmds, "$", 4);
}
- if (cmds[0] != '\0')
- (void)handle_gpsd_request(sub, cmds, (int)strlen(cmds));
}
}
#ifdef DBUS_ENABLE