diff options
author | mledford <michael@ledford.cc> | 2011-04-10 21:13:49 -0400 |
---|---|---|
committer | mledford <michael@ledford.cc> | 2011-04-10 21:13:49 -0400 |
commit | edcb330fba131ba2597922ed27674732d02e3d8d (patch) | |
tree | 05b6bbf7eae1207e5c90e4f20ffc4e9cbd6e71ad | |
parent | 544d9e9036b5e35c5e6e2526ba3071f3d8905177 (diff) | |
parent | 56e40baed0e986ca9c2391980870ea46d5e94fbf (diff) | |
download | gpsd-edcb330fba131ba2597922ed27674732d02e3d8d.tar.gz |
Merge branch 'master' of ssh://git.berlios.de/gitroot/gpsd
-rw-r--r-- | net_ntrip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net_ntrip.c b/net_ntrip.c index bcdc1dfb..a8b03de2 100644 --- a/net_ntrip.c +++ b/net_ntrip.c @@ -313,8 +313,9 @@ static int ntrip_stream_req_probe(const struct ntrip_stream_t *stream) (void)snprintf(buf, sizeof(buf), "GET / HTTP/1.1\r\n" "User-Agent: NTRIP gpsd/%s\r\n" + "Host: %s\r\n" "Connection: close\r\n" - "\r\n", VERSION); + "\r\n", VERSION, stream->url); r = write(dsock, buf, strlen(buf)); if (r != (ssize_t)strlen(buf)) { gpsd_report(LOG_ERROR, "ntrip stream write error %d on fd %d during probe request %zd\n", @@ -367,10 +368,11 @@ static int ntrip_stream_get_req(const struct ntrip_stream_t *stream) (void)snprintf(buf, sizeof(buf), "GET /%s HTTP/1.1\r\n" "User-Agent: NTRIP gpsd/%s\r\n" + "Host: %s\r\n" "Accept: rtk/rtcm, dgps/rtcm\r\n" "%s" "Connection: close\r\n" - "\r\n", stream->mountpoint, VERSION, stream->authStr); + "\r\n", stream->mountpoint, VERSION, stream->url, stream->authStr); if (write(dsock, buf, strlen(buf)) != (ssize_t) strlen(buf)) { gpsd_report(LOG_ERROR, "ntrip stream write error %d on fd %d during get request\n", errno, dsock); |