diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2006-12-01 22:04:37 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2006-12-01 22:04:37 +0000 |
commit | 9cd9b146ab5d1738e2915bbff06ca8f6e1dee5cd (patch) | |
tree | 80ca14f141487e13b1392c028084cd4346f3bb4c | |
parent | d996bcd726138d2375c898e420d94ada6666095e (diff) | |
download | gpsd-9cd9b146ab5d1738e2915bbff06ca8f6e1dee5cd.tar.gz |
Allow device speed to be fetched with the B command even if it can't be changed
-rw-r--r-- | gpsd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |