summaryrefslogtreecommitdiff
path: root/src/wispr.c
AgeCommit message (Collapse)AuthorFilesLines
2014-07-17Imported Upstream version 1.24upstream/1.24Zhang zhengguang1-72/+80
2013-04-28core: Print timezone information if available from serverMarcel Holtmann1-0/+4
2013-01-04core: Remove WiMAX definitions from codePatrik Flykt1-1/+0
2012-10-23wispr: Free wispr portal context in the relevant placeTomasz Bursztyka1-11/+11
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.
2012-10-16wispr: Keep track of proxy callback timeoutPatrik Flykt1-2/+10
Keep track of the zero-second no proxy callback timeout and remove it when freeing up the WISPr context.
2012-10-01wispr: Properly handle Agent errorTomasz Bursztyka1-6/+8
2012-09-28wispr: Service does not need to be reference countedPatrik Flykt1-5/+0
2012-09-28wispr: Free wispr portal context struct instead of unreferencing itPatrik Flykt1-40/+9
The structure can now be directly freed, since the reference count is always one. As a result, remove wispr_portal_context_unref() function.
2012-09-28wispr: Remove service usage reset functionPatrik Flykt1-22/+2
Remove reset_service_usage() as it is now obsolete with the refcount always being equal to one.
2012-09-28wispr: Agent calls need not be referencedPatrik Flykt1-29/+2
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.
2012-09-28wispr: Clean up reference countingPatrik Flykt1-22/+9
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.
2012-09-11wispr: Add backpointer to wispr portal structurePatrik Flykt1-0/+10
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.
2012-08-22wispr: Fix refcounting issueTomasz Bursztyka1-4/+9
2012-07-19wispr: Add a reference counter mechanism on contextsTomasz Bursztyka1-10/+120
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
2012-05-28agent: Update functions used by wispr to send -EINPROGRESSPatrik Flykt1-1/+1
Handle the change from -EIO to -EINPROGRESS return value in wispr.c.
2012-05-22wispr: If redirected and TLS is not supported we fallback on browser requestTomasz Bursztyka1-2/+3
2012-05-09wispr: Remove dead assignmentHenrique Dante de Almeida1-1/+1
2012-05-04wispr: Add check for status 400Patrik Flykt1-0/+1
2012-05-04wispr: Managing the case when user wants to login through the browser himselfTomasz Bursztyka1-21/+29
2012-05-04agent: Adding a parameter to give the error name to browser callbackTomasz Bursztyka1-1/+1
2012-05-04agent: Adding a parameter to give the error name to authentication callbackTomasz Bursztyka1-1/+1
2012-05-04wispr: Adding some useful debug outputsTomasz Bursztyka1-0/+3
2012-05-04wispr: Set gweb debug at the right placeTomasz Bursztyka1-3/+3
2012-05-02wispr: Use g_strdup() instead of strdup()Jukka Rissanen1-1/+1
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.
2012-05-02wispr: Possible memory leak in error caseJukka Rissanen1-1/+3
2012-04-29core: Update copyright informationMarcel Holtmann1-1/+1
2012-04-27wispr: Set host routes when requested by gwebPatrik Flykt1-4/+93
Set host routes via the interface and identified gateway when requested by gweb. Remove host routes when the check is done. Fixes BMC#25061
2012-04-27wispr: Update g_web_request_get()Patrik Flykt1-2/+4
2012-04-17service: request_input_cb handle wps settingJulien Massot1-0/+1
2012-03-19wispr: do not take care about http_proxyTomasz Bursztyka1-3/+0
2012-03-19wispr: do not lookup for proxy if service does not provide anyTomasz Bursztyka1-6/+23
2012-02-14wispr: Provide a callback for agent browser request to handle the resultTomasz Bursztyka1-2/+22
2012-02-14wispr: Request a browser action through agent apiTomasz Bursztyka1-1/+13
2012-01-05service: Return all system defined nameservers when askedJukka Rissanen1-1/+3
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.
2012-01-05wispr: Retry online check for IPv6Jukka Rissanen1-1/+3
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.
2012-01-05wispr: using only the nameservers from requested serviceTomasz Bursztyka1-0/+11
2012-01-05wispr: fixing a possible memory leak if interface index cannot be retrievedTomasz Bursztyka1-2/+4
2012-01-05service: Remove LoginRequired propertyPatrik Flykt1-4/+0
Remove LoginRequired property and associated functions
2011-12-12wispr: Add SSID and length variables to callbackPatrik Flykt1-0/+1
SSID and lenght variables are not used in wispr callback.
2011-12-12wispr: Add authentication_cb_t boolean to callbackPatrik Flykt1-0/+1
2011-11-28wispr: Use the right interface index with gwebTomasz Bursztyka1-1/+6
2011-10-21wispr: Reference count service properly according to contextsTomasz Bursztyka1-0/+4
2011-10-21wispr: wispr_start will always re-start a new contextTomasz Bursztyka1-13/+13
2011-10-11wispr: Set LoginRequired when wispr login is requestedTomasz Bursztyka1-2/+2
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
2011-10-05wispr: Setting the relevant service property when a login is requiredTomasz Bursztyka1-2/+6
When a wispr redirect occurs we set login required to the service Fixes BMC#23424
2011-09-13wispr: Add magic "wispr" keyword to user agentMarcel Holtmann1-1/+1
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.
2011-09-13wispr: Use different status requests for IPv4 and IPv6Marcel Holtmann1-6/+14
2011-09-12wispr: Requesting login input through the agentTomasz Bursztyka1-0/+76
2011-09-12wispr: Handle WISPr messages and apply relevant statesTomasz Bursztyka1-18/+139
2011-09-12wispr: Added WISPr XML content parserTomasz Bursztyka1-0/+220