[connman] Check interface validity before setting regdom

Ofono may emit a signal with cellular network MCC value, resulting in
a call to wifi_set_regdom(), when the wifi_data structure has been
created but wifi->interface is still NULL. Check the pointer value
before proceeding.

The error condition is difficult to reproduce; mostly it seems to
happen when wlan tethering is active.
Merge pull request #82 from hmallat/wifi-regdom-param-check

[connman] Check interface validity before setting regdom
supplicant: Tie P2P flush D-Bus call to the interface

As the callback for the call accesses GSupplicantInterface structure,
tie the pending call to the interface pointer so that it gets cancelled
if the interface is removed.

[connman] supplicant: Tie P2P flush D-Bus call to the interface
supplicant: rewrite pending DBus call handling for properties

Property-related D-Bus calls may be pending replies when the related
GSupplicantInterface structure is cleaned up. This results in an
attempt to access already freed memory when calls complete.

Fixed by keeping a list of pending property calls, and canceling the
calls related to an interface when the interface is removed. This is a
similar change to the one made earlier for pending method calls.

[connman] supplicant: rewrite pending DBus call handling for properties
wifi: cancel pending supplicant operations when removing

If there are pending D-Bus calls made inside supplicant code when
wifi_remove() frees the wifi struct, wifi plugin callback functions
may attempt to use already released memory when the calls complete.

Fixed by cancelling any outstanding supplicant calls in wifi_remove().

[connman] wifi: cancel pending supplicant operations when removing
Merge pull request #83 from hmallat/supplicant-dbus-call-cancellation

Supplicant dbus call cancellation
[connman] change all connman_info to DBG

connman_info does not have file names in it's output, so it would not
be included in the block out by doing -d '*:!src/rtnl.c'

This effectively makes the output more manageable and readable when
debugging.
This included stat and newlink info clogging the output.
[connman] ofono: set_property_calls table was destroyed too early

It should be kept alive until after we made all the calls that can call us back.
Otherwise we may end up accessing hashtable that has already been destroyed.
[connman] fix crash and report error properly

connect_service() calls __connman_service_connect() which may in turn call
reply_pending() which unrefs service->pending and sets it to NULL. Therefore,
connect_service() needs to check service->pending for NULL prior to calling
dbus_message_unref() on it.

Also, __connman_error_failed() expects a positive error code.
[connman] Don't override user setting when setting auto proxy url via dhcp.

Fixes loss of proxy auto configuration settings on first connect after
reboot or when a DHCP lease is renewed.

The pac field is used to store the user set proxy auto configuration
URL (from Proxy.Configuration property). DHCP was using the same field
instead of the proxy auto configuration field in the IP configuration
structure.
Merge pull request #87 from monich/service_pending_crash

service: fix crash and report error properly
Merge pull request #86 from monich/remove_modem_crash

ofono: set_property_calls table was destroyed too early
[connman] service: cancel agent requests prior to deleting wispr context

Calling __connman_wispr_stop() without connman_agent_cancel() allows pending
wispr requests to complete later which results in a read/write access to the
freed memory and a subsequent crash.

Calling connman_agent_cancel() without __connman_wispr_stop() stops the wispr
sequence which renders the wispr context useless. That makes no sense either.
[connman] make hotspot detection better
Merge pull request #89 from monich/wispr_crash

service: cancel agent requests prior to deleting wispr context
Merge pull request #7 from mer-packages/master

merge upstream to fork
Merge pull request #8 from lpotter/fixhotspot

[connman] make hotspot detection better
Merge pull request #92 from lpotter/fixhotspot

[connman] make hotspot detection better
[connman] handle http status code 505
fix indentation