Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
This fixes 2 issues:
- calling __connman_service_ipconfig_indicate_state() might lead to
restart wispr_portal check, so context should not be freed afterward
but beforehand.
- freeing the context in wispr_manage_message() should not happen since
wispr_manage_message() will return back to wispr_portal_web_result()
where we can still use the context.
Thanks to Julien Massot <jmassot@aldebaran-robotics.com> who reported
the issue and provided logs.
|
|
Keep track of the zero-second no proxy callback timeout and remove
it when freeing up the WISPr context.
|
|
|
|
|
|
The structure can now be directly freed, since the reference count
is always one. As a result, remove wispr_portal_context_unref()
function.
|
|
Remove reset_service_usage() as it is now obsolete with the
refcount always being equal to one.
|
|
There is no need to refcount while doing Agent API calls, since
outstanding Agent API calls are removed when the service is
disconnected.
Also remove wispr_portal_context_ref() as it is no longer used.
|
|
connman_wispr_portal_context is initialized with refcount set to one.
Don't reference it an additional times while doing asynchronous calls
if the calls can be cancelled. Unreference the structure when done.
|
|
When calling free_connman_wispr_portal_context(), the context is
freed. Add a backpointer to the wispr portal context in order to
clear the context from the wispr_portal struct.
|
|
|
|
Basically, wispr provides a pointer (a wispr/portal context) to third parties
(agent, gweb...) which are answering asynchronously. However, if the technology
related to the service owning such context is disabled: this context is not
valid anymore, leading to a crash when third part answers after such action.
In order to avoid such issue, wispr implement an internal refcount system.
Fixes BMC#25479
|
|
Handle the change from -EIO to -EINPROGRESS return value in
wispr.c.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Valgrind reports following error if strdup() is used here:
==12572== Invalid read of size 4
==12572== at 0x429113B: ??? (in /lib/libc-2.11.90.so)
==12572== by 0x80A8154: wispr_route_request (wispr.c:471)
==12572== by 0x805CA4F: resolv_result (gweb.c:449)
==12572== by 0x805DD4B: sort_and_return_results (gresolv.c:494)
==12572== by 0x805E285: received_udp_data (gresolv.c:705)
==12572== by 0x40AD8E6: ??? (in /lib/libglib-2.0.so.0.2800.6)
==12572== by 0x4078AFA: g_main_context_dispatch (in /lib/libglib-2.0.so.0.2800.6)
==12572== by 0x407911E: ??? (in /lib/libglib-2.0.so.0.2800.6)
==12572== by 0x40796BC: g_main_loop_run (in /lib/libglib-2.0.so.0.2800.6)
==12572== by 0x807400F: main (main.c:508)
==12572== Address 0x55f406c is 20 bytes inside a block of size 22 alloc'd
==12572== at 0x4029AE9: malloc (vg_replace_malloc.c:236)
==12572== by 0x40B1D6C: g_malloc (in /lib/libglib-2.0.so.0.2800.6)
==12572== by 0x40B4C25: g_strdup (in /lib/libglib-2.0.so.0.2800.6)
==12572== by 0x805CA23: resolv_result (gweb.c:1222)
==12572== by 0x805DD4B: sort_and_return_results (gresolv.c:494)
==12572== by 0x805E285: received_udp_data (gresolv.c:705)
==12572== by 0x40AD8E6: ??? (in /lib/libglib-2.0.so.0.2800.6)
==12572== by 0x4078AFA: g_main_context_dispatch (in /lib/libglib-2.0.so.0.2800.6)
==12572== by 0x407911E: ??? (in /lib/libglib-2.0.so.0.2800.6)
==12572== by 0x40796BC: g_main_loop_run (in /lib/libglib-2.0.so.0.2800.6)
==12572== by 0x807400F: main (main.c:508)
==12572==
If g_strdup() is used then no error is printed.
This error does not make much sense but anyway use g_strdup()
like in other parts of this file.
|
|
|
|
|
|
Set host routes via the interface and identified gateway when
requested by gweb. Remove host routes when the check is done.
Fixes BMC#25061
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The connman_service_get_nameservers() is changed to return
all system defined nameservers. This means that the function
now returns an allocated array of all nameservers and caller
must deallocate the returned array.
The change is needed so that we can combine the nameservers
that are set by DHCP code and the IPv6 nameservers that are
set by router advertisements.
|
|
Because IPv6 RA messages can come at any point when connection is
established, we might do wispr check before possible IPv6 DNS RA
is received so in that case wispr check could fail.
If wispr check fails for IPv6 we try to do the check once (after
waiting one second timeout) in a hope that system is configured
properly during that period.
|
|
|
|
|
|
Remove LoginRequired property and associated functions
|
|
SSID and lenght variables are not used in wispr callback.
|
|
|
|
|
|
|
|
|
|
Setting it while handling redirection is not bullet proof in case
of AP which does not implement well wispr and sends wispr content
with no redirection at first place.
Fixes BMC#23424
|
|
When a wispr redirect occurs we set login required to the service
Fixes BMC#23424
|
|
Without the "wispr" keyword in the user agent string, some WISPr 1.0
hotspots (like T-Mobile and Telekom) are not responding with the
proper WISPr XML properties.
|
|
|
|
|
|
|
|
|