summaryrefslogtreecommitdiff
path: root/gps2udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gps2udp.c')
-rw-r--r--gps2udp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gps2udp.c b/gps2udp.c
index ac816bc8..8549a129 100644
--- a/gps2udp.c
+++ b/gps2udp.c
@@ -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 ++) {