diff options
author | Gary E. Miller <gem@rellim.com> | 2014-01-03 11:27:51 -0800 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2014-01-03 11:27:51 -0800 |
commit | 17d1650f752ebdce066a0e99ef118954a7473970 (patch) | |
tree | 22903324ea77123247b9b1cab8291c8b67c02332 /gps2udp.c | |
parent | 539333a81b5786f2edf4b6378b75e5c966eb5125 (diff) | |
download | gpsd-17d1650f752ebdce066a0e99ef118954a7473970.tar.gz |
gps2udp: do not send out JSON when not configured to do so
From: Ferry Huberts <mailings@hupie.com>
Diffstat (limited to 'gps2udp.c')
-rw-r--r-- | gps2udp.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -105,6 +105,11 @@ static int send_udp (char *nmeastring, size_t ind) buffer[ind] = '\r'; ind++; buffer[ind] = '\0'; + if (!(flags & WATCH_JSON) && buffer[0] == '{') { + /* do not send JSON when not configured to do so */ + return 0; + } + /* send message on udp channel */ /*@-type@*/ for (channel=0; channel < udpchannel; channel ++) { |