summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2006-12-01 22:04:37 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2006-12-01 22:04:37 +0000
commit9cd9b146ab5d1738e2915bbff06ca8f6e1dee5cd (patch)
tree80ca14f141487e13b1392c028084cd4346f3bb4c /gpsd.c
parentd996bcd726138d2375c898e420d94ada6666095e (diff)
downloadgpsd-9cd9b146ab5d1738e2915bbff06ca8f6e1dee5cd.tar.gz
Allow device speed to be fetched with the B command even if it can't be changed
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gpsd.c b/gpsd.c
index 0bad2c26..94591b30 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -649,8 +649,8 @@ static int handle_gpsd_request(struct subscriber_t* sub, char *buf, int buflen)
else
(void)strlcpy(phrase, ",A=?", BUFSIZ);
break;
-#ifndef FIXED_PORT_SPEED
case 'B': /* change baud rate (SiRF/Zodiac only) */
+#ifndef FIXED_PORT_SPEED
if (assign_channel(sub) && sub->device->device_type!=NULL && *p=='=' && privileged_user(sub)) {
i = atoi(++p);
while (isdigit(*p)) p++;
@@ -680,6 +680,7 @@ static int handle_gpsd_request(struct subscriber_t* sub, char *buf, int buflen)
}
#endif /* ALLOW_RECONFIGURE */
}
+#endif /* FIXED_PORT_SPEED */
if (sub->device) {
if ( sub->device->gpsdata.parity == 0 ) {
/* zero parity breaks the next snprintf */
@@ -694,7 +695,6 @@ static int handle_gpsd_request(struct subscriber_t* sub, char *buf, int buflen)
(void)strlcpy(phrase, ",B=?", BUFSIZ);
}
break;
-#endif
case 'C':
if (!assign_channel(sub) || sub->device->device_type==NULL)
(void)strlcpy(phrase, ",C=?", BUFSIZ);