summaryrefslogtreecommitdiff
path: root/libnm-glib
Commit message (Collapse)AuthorAgeFilesLines
* libnm,libnm-glib: add Device.Managed setterLubomir Rintel2015-09-183-0/+37
|
* tests: raise the mock service startup timeoutLubomir Rintel2015-08-171-1/+1
| | | | | Python is just too slow on some machines. Needed around twice the previous limit on BCM2835 with Pidora 20, let's add some safety margin too.
* libnm-glib: add NM_AVAILABLE_IN_1_2 for API nm_access_point_get_last_seen()Thomas Haller2015-08-091-0/+1
| | | | Fixes: f3b8285be509ad69fe24c50dad9a2514cd3f5f07
* all: drop includes to <glib/gi18n.h> for "nm-default.h"Dan Winship2015-08-052-2/+0
| | | | | | | The localization headers are now included via "nm-default.h". Also fixes several places, where we wrongly included <glib/gi18n-lib.h> instead of <glib/gi18n.h>. For example under "clients/" directory.
* nm-default: include i18n headers via "nm-default.h"Thomas Haller2015-08-051-0/+1
|
* all: make use of new header file "nm-default.h"Thomas Haller2015-08-0533-33/+33
|
* libnm-glib: add libnm compat defines to nm-vpn-plugin-ui-interface.hDan Winship2015-07-251-0/+46
| | | | | | | | Add a bunch of compat defines to nm-vpn-plugin-ui-interface.h, to make it easier to compile the same code against libnm-glib's NMVpnPluginUiInterface and libnm's NMVpnEditorPlugin. https://bugzilla.gnome.org/show_bug.cgi?id=752500
* libnm-glib: drop private bus supportDan Winship2015-07-247-210/+106
| | | | | Anything that actually *needs* private bus support will be built against libnm these days anyway.
* all: rename nm-glib-compat.h to nm-glib.h, use everywhereDan Winship2015-07-2433-51/+35
| | | | | | | | | | | | | | | | Rather than randomly including one or more of <glib.h>, <glib-object.h>, and <gio/gio.h> everywhere (and forgetting to include "nm-glib-compat.h" most of the time), rename nm-glib-compat.h to nm-glib.h, include <gio/gio.h> from there, and then change all .c files in NM to include "nm-glib.h" rather than including the glib headers directly. (Public headers files still have to include the real glib headers, since nm-glib.h isn't installed...) Also, remove glib includes from header files that are already including a base object header file (which must itself already include the glib headers).
* include: add nm-dbus-compat.hDan Winship2015-07-245-9/+9
| | | | | | | | | Add a file containing the defines like DBUS_INTERFACE_DBUS from dbus-shared.h, and use it from the gdbus-using files. Also, convert a bunch of other places that were previously hardcoding the string values to use the defines instead, and fix the ifcfg-rh plugin to properly namespace its own D-Bus-related defines.
* libnm/libnm-glib: don't quit in the middle of asking for secrets (bgo #752237)Dan Williams2015-07-161-3/+17
| | | | | | | | | | | | | If the VPN plugin terminated and the user started it again, then the quit timer will still be running and it sometimes happens that the VPN plugin will quit while the UI is asking the user for secrets. That's not very nice, so don't do that. Reproducer: while connect to the VPN, suspend your laptop. Then resume it, and immediately re-start the VPN connection. Watch the secrets dialog disappear within a very short time. https://bugzilla.gnome.org/show_bug.cgi?id=752237
* libnm/libnm-glib: clean up VPN plugin timeoutsDan Williams2015-07-161-56/+25
| | | | Use nm_clear_g_source().
* all: remove #if GLIB_CHECK_VERSION conditionals around g_type_init()Thomas Haller2015-07-122-6/+5
| | | | g_type_init() is now provided by nm-glib-compat.h as nm_g_type_init().
* test: initialize tests with nmtst_init()Thomas Haller2015-07-122-12/+10
|
* libnm-glib: avoid coverity warningThomas Haller2015-06-251-1/+1
| | | | | | | | | | 5. NetworkManager-1.0.3/libnm-glib/nm-remote-settings.c:493: var_compare_op: Comparing "error" to null implies that "error" might be null. 8. NetworkManager-1.0.3/libnm-glib/nm-remote-settings.c:508: var_deref_op: Dereferencing null pointer "error". # 506| g_hash_table_remove (priv->pending, path); # 507| # 508|-> if (print_once && error->code == DBUS_GERROR_LIMITS_EXCEEDED) { # 509| g_printerr ("Warning: libnm-glib:%s(): a D-Bus limit exceeded: %s. The application might not work properly.\n" # 510| "Consider increasing max_replies_per_connection limit in /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf "
* libnm-glib: print a bold warning about reaching a D-Bus limitJiří Klimeš2015-05-291-0/+9
| | | | | This causes incorrect application behaviour, so libnm-glib should warn at least.
* builds: only enable TAP driver for glib >= 2.37.6Lubomir Rintel2015-05-281-2/+0
| | | | | No TAP support for previous versions and --tap argument is silently ignored, confusing the TAP driver.
* libnm-glib: do not access NULL GError variable (rh #1224819)Jiří Klimeš2015-05-261-4/+6
| | | | | | | dbus_g_proxy_call() should set GError if returning FALSE. But apparently there is a bug in dbus-glib and the error can be NULL. https://bugzilla.redhat.com/show_bug.cgi?id=1224819
* tests: use the TAP formatterLubomir Rintel2015-05-261-0/+2
| | | | The test results in standard format are easily integrated into CI systems.
* build: switch to parallel test harnessLubomir Rintel2015-05-261-1/+1
| | | | This will make it possible to use the TAP formatter.
* tests: always spawn private d-busLubomir Rintel2015-05-261-5/+3
| | | | Parallel test runs would not be possible without this.
* wifi: expose the last_seen property for a NMAccessPointMathieu Trudel-Lapierre2015-04-293-0/+47
| | | | https://mail.gnome.org/archives/networkmanager-list/2015-April/msg00053.html
* wimax: drop WiMAX support (bgo #747846)Dan Winship2015-04-172-0/+53
| | | | | | | | | | | | | | | | | | | | Even Fedora is no longer shipping the WiMAX SDK, so it's likely we'll eventually accidentally break some of the code in src/devices/wimax/ (if we haven't already). Discussion on the list showed a consensus for dropping support for WiMAX. So, remove the SDK checks from configure.ac, remove the WiMAX device plugin and associated manager support, and deprecate all the APIs. For compatibility reasons, it is still possible to create and save WiMAX connections, to toggle the software WiMAX rfkill state, and to change the "WIMAX" log level, although none of these have any effect, since no NMDeviceWimax will ever be created. nmcli was only compiling in support for most WiMAX operations when NM as a whole was built with WiMAX support, so that code has been removed now as well. (It is still possible to use nmcli to create and edit WiMAX connections, but those connections will never be activatable.)
* libnm,core: don't mix up enum typesLubomir Rintel2015-03-191-1/+1
| | | | Touches a weak spot on clang's soul.
* libnm-glib/tests: fix calling tests without valgrindThomas Haller2015-02-091-1/+1
| | | | Fixes: e7356ef0a6fa94b20850d6f8ca73bfac17589510
* libnm/tests: enable valgrind for libnm testsThomas Haller2015-02-091-3/+5
|
* libnm/tests: fix memleaks in test code for valgrindThomas Haller2015-02-091-1/+5
|
* tests: enable valgrind tests for testsThomas Haller2015-02-091-0/+1
|
* libnm-glib/nm-client: zero the CheckConnectivityData structureRui Matos2015-01-081-1/+1
| | | | | | | | Otherwise, if the caller doesn't provide a cancellable we'll try to access a bogus ccd->cancellable in check_connectivity_data_free() and crash. https://bugzilla.gnome.org/show_bug.cgi?id=740841
* libnm-glib: crash when NMRemoteSettings is quickly destroyed (bgo #742138)Dan Winship2015-01-051-1/+3
| | | | | | | | NMRemoteSettings queues a bunch of async NMRemoteConnection creations, but wasn't doing anything to ensure that it was still alive when they completed. Pointed out by Cosimo Cecchi. https://bugzilla.gnome.org/show_bug.cgi?id=742138
* libnm-util, libnm-glib: bump sonames for 1.0Dan Winship2014-12-181-1/+1
| | | | libnm-util.so.2.7.0, libnm-glib.so.4.9.0
* docs: misc small fixesDan Winship2014-12-184-6/+14
| | | | Cleans up all of the warnings that aren't overly annoying to clean up.
* tests: mute coverity for CHECKED_RETURN (CWE-252) in testsJiří Klimeš2014-12-151-1/+3
| | | | | | Error: CHECKED_RETURN (CWE-252): [#def12] NetworkManager-0.9.11.0/libnm-core/tests/test-general.c:348: check_return: Calling "nm_setting_verify" without checking return value (as is done elsewhere 37 out of 45 times). ...
* libnm: add missing (transfer) annotation for nm_device_vlan_get_parent()Jiří Klimeš2014-11-251-1/+1
|
* libnm-glib: add :parent property for VLAN devicesJiří Klimeš2014-11-243-1/+43
|
* libnm*: fix library gettext usageDan Winship2014-11-132-2/+2
| | | | | | | | | | | | | | | | | Libraries need to include <gi18n-lib.h>, not <gi18n.h>, so that _() will get defined to "dgettext (GETTEXT_DOMAIN, string)" rather than "gettext (string)" (which will use the program's default domain, which works fine for programs in the NetworkManager tree, but not for external users). Likewise, we need to call bindtextdomain() so that gettext can find the translations if the library is installed in a different prefix from the program using it (and bind_textdomain_codeset(), so it will know the translations are in UTF-8 even if the locale isn't). (The fact that no one noticed this was broken before is because the libraries didn't really start returning useful translated strings much until 0.9.10, and none of the out-of-tree clients have been updated to actually show those strings to users yet.)
* all: consistently include config.hDan Winship2014-11-1338-16/+75
| | | | | | | | | | | config.h should be included from every .c file, and it should be included before any other include. Fix that. (As a side effect of how I did this, this also changes us to consistently use "config.h" rather than <config.h>. To the extent that it matters [which is not much], quotes are more correct anyway, since we're talking about a file in our own build tree, not a system include.)
* tests: Don't run session-long dbus daemons for testsLubomir Rintel2014-10-241-3/+5
| | | | | | They require a tty or X11 displays, thus are not suitable for headless runs (such as in mock). Furthermore, they die with the tty or X11 session, which is somehow late -- a lot of them may accumulate. Let's kill them right away.
* remote-settings: Mark service as running when using private busFlorian Müllner2014-10-171-2/+3
| | | | | | | | When using a private bus connection, the service is never marked as running when settings are initialized asynchronously. Successfully opening a socket in NM's runtime directory should already imply a running service, so just mark it as such (as we already do in the synchronous path).
* libnm, libnm-glib: clarify nm_client_activate_connection() semanticsDan Winship2014-10-051-0/+10
| | | | | | | | | nm_client_activate_connection() and nm_client_add_and_activate_connection() return when the activation has *started*, not when it *finishes*. Clarify this a bit more in the libnm docs, and copy that clarification to libnm-glib as well. https://bugzilla.gnome.org/show_bug.cgi?id=736233
* libnm: ensure auto-registration only when not yet registeredThomas Haller2014-08-271-1/+2
| | | | | | | | | | Calling nm_secret_agent_register() on an already registered instance leads to a warning. Ensure to call register during auto-registration only when needed. https://bugzilla.gnome.org/show_bug.cgi?id=727923 Signed-off-by: Thomas Haller <thaller@redhat.com>
* libnm, libnm-glib: fix cut-and-paste-osDan Winship2014-08-184-16/+16
| | | | | | Several nm-device-*.c files apparently originally used nm-device-ethernet.c as a template, but missed a reference to "eth" in class_init.
* libnm, libnm-glib: belatedly replace _nm_client_is_object_path()Dan Winship2014-08-071-46/+2
| | | | | | | _nm_client_is_object_path() had been copied from g_variant_is_object_path() with a note that it should be replaced when we depended on GLib > 2.24, but it got missed when we actually updated the dependency. Fix it now. (Also fix a nearby typo.)
* libnm-glib: add tests of NMClient:manager-running and ↵Dan Winship2014-08-012-0/+154
| | | | | | | NMRemoteSettings:service-running Test that the code to track whether NetworkManager is running works correctly.
* libnm-glib: fix a crash when using multiple NMClientsDan Winship2014-08-014-17/+19
| | | | | | | | | | | | | | NMObjectCache was assuming there would never be more than one object with the same path, but since NMClient is an NMObject, it was getting cached too, so if you created two clients and then unreffed one of them, it's possible the wrong one could get left in the cache, causing a crash the next time the other one called nm_object_cache_clear(). Fix this by only adding NMObjects to the cache in the codepaths where we also check to see if the object was already in the cache. (This also means we can remove the "except" argument to nm_object_cache_clear(), since the NMClient won't be cached any more.)
* libnm-glib: make test-networkmanager-service.py automatically exit with its ↵Dan Winship2014-08-014-158/+118
| | | | | | | | | | | | | | | | | | | parent test-nm-client.c and test-remote-settings-client.c were using their own assertion macros so they could kill the test service on assertion failure. Except that some new code didn't get the memo and used the g_assert* macros. Not to mention that sometimes the tests would crash outside of an assertion macro. We can make test-networkmanager-service.py notice that its parent has crashed by opening a pipe between them and taking advantage of the fact that the pipe will be automatically closed if the parent crashes. So then test-networkmanager-service.py just has to watch for that, and exit if the pipe closes. Then that lets us drop the test_assert* macros and just use g_assert* instead.
* libnm-glib: split out test service launching code from testsDan Winship2014-08-015-179/+224
|
* libnm-glib: use automake test infrastructure for test programsDan Winship2014-08-012-9/+13
| | | | | | | | Use "TESTS = tests-nm-client test-remote-settings-client" rather than overriding "check-local". Add a script "libnm-test-launch.sh" that will handle redirecting the test via dbus-launch if needed.
* libnm-glib: compile test-networkmanager-service.py path into test binariesDan Winship2014-08-013-23/+10
| | | | | | | | Rather than passing the path to the test service on the command line, compile it into the test programs. (Among other things, this makes it easier to run the test directly from the command line.)
* libnm-glib: fix warning about redefining typedef RemoteCallThomas Haller2014-08-011-2/+2
| | | | | | | | | | | | | | | clang warns: make[4]: Entering directory `./NetworkManager/libnm-glib' CC libnm_glib_la-nm-remote-connection.lo nm-remote-connection.c:77:3: error: redefinition of typedef 'RemoteCall' is a C11 feature [-Werror,-Wtypedef-redefinition] } RemoteCall; ^ nm-remote-connection.c:67:27: note: previous definition is here typedef struct RemoteCall RemoteCall; ^ Signed-off-by: Thomas Haller <thaller@redhat.com>