Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Remove all lookups found in queue when GResolv object is removed.
|
|
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.
|
|
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.
|
|
|
|
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
|
|
The nat struct was not freed when it is was removed from the hash.
|
|
Instead of using dhcp_add_simple_option() the gdhcp now uses
three functions for setting uint8, uint16 and uint32 values.
|
|
Convert to network byte order just before sending the packet.
|
|
The alignment macros are copied from Bluez.
|
|
|
|
|
|
|
|
|
|
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.
|
|
We copied too much data into addrinfo struct which corrupted
the protocol and channel fields.
Fixes BMC#25726
|
|
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.
|
|
|
|
|
|
|
|
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).
|
|
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.
|
|
|
|
|
|
|
|
Makefile.am:127: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
|
|
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.
|
|
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
|
|
|
|
|
|
|
|
The inet_rtnl_cb_data struct allocated in __connman_inet_rtnl_talk()
was not deallocated if we expected data from kernel.
|
|
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.
|
|
Check test-connman offlinemode arguments and the number of arguments
in general.
Fixes BMC#25723
|
|
|
|
|
|
Now this function is only used for searching the listeners of a
connection and the other parameters are not needed anymore.
|
|
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.
|
|
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)
|
|
|
|
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.
|
|
|
|
Add a '--nobacktrace' command line switch to let the system
handle stack traces. The default is to let ConnMan handle them
as before
|
|
|
|
PrefixLength is exposed as a byte in the API, but code was
waiting for a string when setting a new value.
|
|
An empty AllowedBearers means do not match anything.
|
|
|