From: Kaj-Michael Lang Date: Fri, 19 Oct 2007 13:28:33 +0000 (+0300) Subject: Check that GPS MAC address is set X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb70502fc952b1e0b816bb2971b37b3755627c01;p=mapper Check that GPS MAC address is set --- diff --git a/src/bt-bluez.c b/src/bt-bluez.c index 2ca1345..f1cd511 100644 --- a/src/bt-bluez.c +++ b/src/bt-bluez.c @@ -154,6 +154,9 @@ if (_fd != -1) { gboolean rcvr_connect_now() { +if (!_rcvr_mac) + return FALSE; + _rcvr_addr.rc_family = AF_BLUETOOTH; _rcvr_addr.rc_channel = 1; str2ba(_rcvr_mac, &_rcvr_addr.rc_bdaddr); diff --git a/src/ui-common.c b/src/ui-common.c index ced30c0..b426471 100644 --- a/src/ui-common.c +++ b/src/ui-common.c @@ -410,7 +410,7 @@ if (!been_here++) { } } /* Connect to receiver. */ - if (_enable_gps) + if (_enable_gps && _rcvr_mac) rcvr_connect_now(); done_here++; /* Don't ask... */