From: Patrik Flykt <[email protected]>
Hi,
v2 of this patch set adds four more fixes for various issues found while
investigating tethering related crashes and factors out code "cleanups"
from two of the previous patches.
If an error happens while adding a dnsproxy listener for an interface,
struct listener_data gets added uninitialized to the hash table. This
causes a GLib assert when the NULL GIO channel is unreferenced (patch 01).
Instead of setting technology->state to offline when the last device
is removed from a technology, call __connman_technology_disabled() to get
the reference counting correct. Unless this is done, the technology
cannot be enabled again (patch 03).
When disabling a technology, remember to disable any tethering too (patch 04).
Add a NULL check for supplicant callback data (patch 06).
Add NULL checks and reference count struct connman_network and struct
connman_device handed over to wifi.c (patch 07).
Set pending disable state when the device is being disabled (patch 09).
Only disable tethering if no other technologies are tethering (patch 10).
Patch 02 optimizes away hash table lookups by passing around struct
listener_data where appropriate. Patch 05 moves bridge checking into
set_tethering, as it's not used anywhere else. Finally, patch 08 simplifies
the device pending reset timeout function.
Cheers,
Patrik
Patrik Flykt (10):
dnsproxy: Fix __connman_dnsproxy_add_listener() error handling
dnsproxy: Use listener data instead of hash table lookups
technology: Cause technology->enabled to be properly decremented
technology: When disabling technology, disble tethering too
technology: Move bridege checking to set_tethering()
supplicant: Handle NULL user data in interface_get_result()
wifi: Reference counting and NULL check fixes
device: Simplify device_pending_reset()
device: Set PENDING_DISABLE on device disable
technology: Disable tethering only when no technology is tethering
gsupplicant/supplicant.c | 5 +++
plugins/wifi.c | 27 +++++++++++++----
src/device.c | 8 ++---
src/dnsproxy.c | 70 ++++++++++++++++++++-------------------------
src/technology.c | 37 +++++++++++++++---------
5 files changed, 82 insertions(+), 65 deletions(-)
--
1.7.2.5
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman