summaryrefslogtreecommitdiff
path: root/net_ntrip.c
diff options
context:
space:
mode:
authorAndre Naujoks <nautsch2@googlemail.com>2011-02-25 08:25:19 -0500
committerEric S. Raymond <esr@thyrsus.com>2011-02-25 08:25:19 -0500
commitda5c8b32299a85cd10b9d3f6803b063c67784bb0 (patch)
tree72fae88a4575ff270d33d1afd9632b14c6f23172 /net_ntrip.c
parent14f96471e0206287729b85e084592e8f8bd9bf04 (diff)
downloadgpsd-da5c8b32299a85cd10b9d3f6803b063c67784bb0.tar.gz
With this minor patch, working NTRIP is confirmed.
Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Diffstat (limited to 'net_ntrip.c')
-rw-r--r--net_ntrip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net_ntrip.c b/net_ntrip.c
index 5fa3a3dd..b5b4ca29 100644
--- a/net_ntrip.c
+++ b/net_ntrip.c
@@ -474,11 +474,12 @@ int ntrip_open(struct gps_device_t *device, char *caster)
switch (device->ntrip.conn_state) {
case ntrip_conn_init:
+ /* this has to be done here, because it is needed for multi-stage connection */
device->servicetype = service_ntrip;
device->ntrip.works = false;
device->ntrip.sourcetable_parse = false;
ntrip_stream.set = false;
- (void)strlcpy(tmp, caster, strlen(caster));
+ (void)strlcpy(tmp, caster, strlen(caster) + 1);
/*@ -boolops @*/
if ((amp = strchr(tmp, '@')) != NULL) {
@@ -516,7 +517,6 @@ int ntrip_open(struct gps_device_t *device, char *caster)
port = DEFAULT_RTCM_PORT;
}
- /* this has to be done here, because it is needed for multi-stage connection */
strncpy(ntrip_stream.mountpoint, stream, 101); /* magic numbers from struct definitions */
strncpy(ntrip_stream.credentials, auth, 128); /* magic numbers from struct definitions */
strncpy(ntrip_stream.url, url, 256);