diff --git a/geo/core/functions b/geo/core/functions index af8ef43..9aa11b0 100644 --- a/geo/core/functions +++ b/geo/core/functions @@ -19,6 +19,9 @@ get_current_location() { local full_req="${url}?browser=true&sensor=true${query}" current_location_json="$(getter ${full_req})" + if echo "$current_location_json" | grep -qi 'error'; then + current_location_json="" + fi fi } diff --git a/geo/platform/mac/functions b/geo/platform/mac/functions index 8831cf0..4c98de7 100644 --- a/geo/platform/mac/functions +++ b/geo/platform/mac/functions @@ -11,7 +11,7 @@ get_wifi_access_points() { if [ -n "$wifi_info" ]; then wifi_points=`$airport -s -x | egrep 'BSSID|>CHANNEL<|NOISE|SSID_STR|RSSI' --after-context=1 \ - | egrep -v "AGE|array|WPA|80211" | tr '\n' ' ' | tr -d '\t' \ + | head -374 | egrep -v "AGE|array|WPA|80211" | tr '\n' ' ' | tr -d '\t' \ | sed -e 's/<[^>]*>//g' \ -e 's/ -- /, /g' \ -e 'y/:/-/' \