diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-11-19 04:19:17 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-11-19 04:19:17 -0500 |
commit | d1645133ee3aecb02f1f8f61a1e0854eb5c712da (patch) | |
tree | bb830c53d9bed842bfa0c3a2d74ebbd278266f0e /gpsmon.c | |
parent | 08198ac8b5d745cf678d0eb7c34e99deb0dc894d (diff) | |
download | gpsd-d1645133ee3aecb02f1f8f61a1e0854eb5c712da.tar.gz |
Add timeout on wait-for-ACK to SiRF driver.
Correct initialization observed oon SiRF-III. All regression tests pass.
Diffstat (limited to 'gpsmon.c')
-rw-r--r-- | gpsmon.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1158,7 +1158,13 @@ int main(int argc, char **argv) else devicename = argv[optind]; - (void)strlcpy(session.gpsdata.dev.path, devicename, + /* backward compatibilty: accept a bare server name */ + if (strchr(devicename, ':') == NULL && devicename[0] != '/') + (void) strlcpy(session.gpsdata.dev.path, + "tcp://", sizeof(session.gpsdata.dev.path)); + else + session.gpsdata.dev.path[0] = '\0'; + (void)strlcat(session.gpsdata.dev.path, devicename, sizeof(session.gpsdata.dev.path)); if (gpsd_activate(&session, O_PROBEONLY) == -1) { |