summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-10-16rfkill: Return the error when write() failsTomasz Bursztyka1-3/+6
2012-10-16gresolv: Remove all pending lookups when resolver is removedJukka Rissanen1-0/+4
Remove all lookups found in queue when GResolv object is removed.
2012-10-16gresolv: Avoid accessing already freed memoryJukka Rissanen1-3/+6
We must remove the lookup from lookup queue and query from query queue before calling user callback. The callback might unref the GResolv which in turn would remove the lookup/query what we are trying to access after the callback is returned. So it is enough to remove the lookup or query entry from queue before cb is called and then manually remove it after the callback has returned.
2012-10-15iptables: Ignore module loading errorJukka Rissanen1-6/+7
In iptables 1.4.9 module loading gives an error even if the module is built in. Ignore the loading errors because the missing iptables support is noticed when trying to get the iptables socket options.
2012-10-15gdhcp: Returned IP address is already in host byte orderJukka Rissanen1-1/+1
2012-10-12gresolv: Remove lookup from correct queueJukka Rissanen1-1/+1
The lookup must be removed from lookup queue and not from query queue when cancelling the lookup. Otherwise it is possible that we might access an already removed lookup that is still found in lookup queue. Fixes BMC#25728
2012-10-12nat: Memory leak when cleaning upJukka Rissanen1-0/+1
The nat struct was not freed when it is was removed from the hash.
2012-10-11gdhcp: Use data size specific option setting functionJukka Rissanen4-31/+72
Instead of using dhcp_add_simple_option() the gdhcp now uses three functions for setting uint8, uint16 and uint32 values.
2012-10-11gdhcp: Use host byte order internallyJukka Rissanen5-71/+58
Convert to network byte order just before sending the packet.
2012-10-11gdhcp: Add unalignment macrosJukka Rissanen2-1/+164
The alignment macros are copied from Bluez.
2012-10-11gdhcp: Remove obsolete load lease functionJukka Rissanen2-8/+0
2012-10-09Release 1.81.8Marcel Holtmann2-1/+10
2012-10-09doc: State is a string typeGustavo Padovan1-1/+1
2012-10-08unit: Wrong enum type used in session codeJukka Rissanen1-1/+1
2012-10-04gdbus: Fix not freeing list node by using g_slist_delete_linkLuiz Augusto von Dentz1-1/+1
g_slist_remove_link does not free the node which can cause leaks so replace that with g_slist_delete_link which does free memory properly.
2012-10-03dnsproxy: Do not overwrite protocol and channel in server structJukka Rissanen1-5/+26
We copied too much data into addrinfo struct which corrupted the protocol and channel fields. Fixes BMC#25726
2012-10-03technology: Do not expose a technology which is hard rfkilledTomasz Bursztyka1-4/+8
If hard rfkilled, a technology will not be exposed through DBus via GetTechnologies. If hard rfkill status changes, TechnologyAdded and TechnologyRemoved signals will be sent accordingly.
2012-10-03technology: Add helpers for (un)registering a technology in D-BusTomasz Bursztyka1-11/+34
2012-10-03technology: Do not apply Powered setting change if hardblock is onTomasz Bursztyka1-1/+7
2012-10-03technology: Simplify set_powered functionTomasz Bursztyka1-7/+3
2012-10-03technology: Link hard rfkill with actual device's stateTomasz Bursztyka1-8/+18
When hardblocking a technology, it should disable the devices which belongs to that technology. When un-hardblocking it should do the same but taking care about user setting (it will enable the devices if only enable_persistent is on).
2012-10-03technology: Handle harblock if all of them have identical typeTomasz Bursztyka1-0/+19
On some hardware, there exist two rfkill entities for the same type with a cascading issue: if one is soft blocked, the other one is hardblocked. But if the hardblock switch is set, all are hardblocked. This patch figures out that a technology is hardblocked only if all related rkill events get the same hardblock value.
2012-10-03technology: Handle rfkill hardblockTomasz Bursztyka1-12/+28
2012-10-03technology: Handle rfkill hash table in a saner wayTomasz Bursztyka1-6/+6
2012-10-03conf: Allow Counter and Notification interfaces in connman-polkit.confTomasz Bursztyka1-0/+2
2012-10-03build: Don't use deprecated INCLUDES variableLucas De Marchi1-1/+1
Makefile.am:127: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
2012-10-03build: Don't use deprecated AM_PROG_MKDIR_PLucas De Marchi1-1/+1
AM_PROG_MKDIR_P is deprecated since: configure.ac:26: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and will soon be removed. configure.ac:26: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead, configure.ac:26: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files. We are already using $(MKDIR_P) so we just need to call the right macro.
2012-10-03build: Fix missing -lrt for clock_gettime()Lucas De Marchi1-1/+1
librt is needed for using clock_gettime(): /usr/bin/ld: src/ntp.o: undefined reference to symbol 'clock_gettime@@GLIBC_2.2.5' /usr/bin/ld: note: 'clock_gettime@@GLIBC_2.2.5' is defined in DSO /usr/lib/librt.so.1 so try adding it to the linker command line /usr/lib/librt.so.1: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status
2012-10-02session: If no policy plugin is selected use default configDaniel Wagner1-2/+12
2012-10-02session: Move the default config create part back to coreDaniel Wagner3-11/+24
2012-10-01error: EINPROGRESS error was not handledJukka Rissanen1-0/+1
2012-10-01inet: Cleanup rtnl callback data properlyJukka Rissanen1-7/+1
The inet_rtnl_cb_data struct allocated in __connman_inet_rtnl_talk() was not deallocated if we expected data from kernel.
2012-10-01ntp: Calculate transmit time from receive time and monotonic deltaPatrik Flykt1-6/+13
Calculate transmit time used in NTP as the reception time minus the delta of the monotonic receive and transmit times. When calculated this way, it does not matter if the time happens to be set to something else between the sending and receiving of the NTP packet. On sending the added monotonic time and the previous transmit time are saved at the same point in time. On reception the monotonic time is evaluated after the packet has been received by ConnMan. This is in contrast to the actual reception wall clock time which is added by the kernel. The difference between the reception times on a normal system is about 100µs, which is neglible.
2012-10-01test: Check test-connman argumentsPatrik Flykt1-8/+19
Check test-connman offlinemode arguments and the number of arguments in general. Fixes BMC#25723
2012-10-01technology: Update tethering properties when relevantTomasz Bursztyka1-6/+22
2012-10-01wispr: Properly handle Agent errorTomasz Bursztyka1-6/+8
2012-09-28gdbus: Refactor filter_data_find()Lucas De Marchi1-38/+5
Now this function is only used for searching the listeners of a connection and the other parameters are not needed anymore.
2012-09-28gdbus: Fix wrong signal handler matchLucas De Marchi1-21/+94
When we add a signal handler with g_dbus_add_signal_watch(), this function tries to multiplex the matches added in libdbus by checking if there's a previous filter_data with the same fields. However, if the field is NULL it accepts as being the same. The result is that the following watches will use the same filter data: watch1 = g_dbus_add_signal_watch(conn, BUS_NAME, NULL, iface, member, cb1, data1, NULL); watch2 = g_dbus_add_signal_watch(conn, BUS_NAME, "/path2", iface, member, cb2, data2, NULL); watch3 = g_dbus_add_signal_watch(conn, BUS_NAME, "/path3", iface, member, cb3, data3, NULL); The result is that when a signal arrives with path == "/path2", all 3 callbacks above will be called, with the same signal delivered to all of them. Another problem is that, if we invert the calls like below, only signals to cb1 will never be trigerred, nonetheless it used path == NULL. watch2 = g_dbus_add_signal_watch(conn, BUS_NAME, "/path2", iface, member, cb2, data2, NULL); watch1 = g_dbus_add_signal_watch(conn, BUS_NAME, NULL, iface, member, cb1, data1, NULL); watch3 = g_dbus_add_signal_watch(conn, BUS_NAME, "/path3", iface, member, cb3, data3, NULL); This is fixed by not multiplexing the matchs with filter data if any of the fields are different, including being NULL. When a signal arrives, if a field is NULL we accept it as a match, but not when adding the signal handler.
2012-09-28gdbus: Fix crash when getting disconnected from the busJohan Hedberg1-4/+5
When getting disconnected from the bus sometimes (maybe always?) dbus_watch_handle() can cause the "info" context to be free'd meaning that we should not try to access it after the call. The only member we need access to is the connection pointer and as the code already has a ref() call for it it's only natural to solve the issue by adding a local variable not dependent on "info". The backtrace of the crash fixed looks as follows: Invalid read of size 8 at 0x121085: watch_func (mainloop.c:105) by 0x4C72694: g_main_context_dispatch (gmain.c:2539) by 0x4C729C7: g_main_context_iterate.isra.23 (gmain.c:3146) by 0x4C72DC1: g_main_loop_run (gmain.c:3340) by 0x120541: main (main.c:551) Address 0x5bbcd90 is 16 bytes inside a block of size 24 free'd at 0x4A079AE: free (vg_replace_malloc.c:427) by 0x4C7837E: g_free (gmem.c:252) by 0x4F708BF: dbus_watch_set_data (dbus-watch.c:614) by 0x4F70938: _dbus_watch_unref (dbus-watch.c:132) by 0x4F6E9A7: _dbus_transport_handle_watch (dbus-transport.c:884) by 0x4F59AFB: _dbus_connection_handle_watch (dbus-connection.c:1497) by 0x4F70AF9: dbus_watch_handle (dbus-watch.c:683) by 0x121084: watch_func (mainloop.c:103) by 0x4C72694: g_main_context_dispatch (gmain.c:2539) by 0x4C729C7: g_main_context_iterate.isra.23 (gmain.c:3146) by 0x4C72DC1: g_main_loop_run (gmain.c:3340) by 0x120541: main (main.c:551)
2012-09-28wispr: Service does not need to be reference countedPatrik Flykt2-5/+1
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-28TODO: Add --nobacktrace removal taskPatrik Flykt1-0/+9
2012-09-28log: Disable stack trace from command linePatrik Flykt4-10/+17
Add a '--nobacktrace' command line switch to let the system handle stack traces. The default is to let ConnMan handle them as before
2012-09-28test: Fix PrefixLength setting in set-ipv6-methodTomasz Bursztyka1-1/+4
2012-09-28ipconfig: Fix IPv6.Configuration parsingTomasz Bursztyka1-5/+3
PrefixLength is exposed as a byte in the API, but code was waiting for a string when setting a new value.
2012-09-27unit: Do not append empty AllowedBearers dictionaryDaniel Wagner1-0/+3
An empty AllowedBearers means do not match anything.
2012-09-27session: Apply policy on AllowedBearersDaniel Wagner1-3/+100