mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 10:30:22 +01:00
all: merge branch 'th/mixed'
https://github.com/NetworkManager/NetworkManager/pull/64
This commit is contained in:
commit
bc81efec55
62 changed files with 290 additions and 2394 deletions
12
Makefile.am
12
Makefile.am
|
|
@ -623,7 +623,7 @@ endif
|
|||
|
||||
EXTRA_DIST += \
|
||||
libnm-core/crypto_gnutls.c \
|
||||
libnm-core/crypto_nss.c \
|
||||
libnm-core/crypto_nss.c \
|
||||
libnm-core/nm-core-enum-types.c.template \
|
||||
libnm-core/nm-core-enum-types.h.template \
|
||||
libnm-core/meson.build
|
||||
|
|
@ -712,11 +712,11 @@ $(libnm_core_tests_test_settings_defaults_OBJECTS): $(libnm_core_lib_h_pub_mkenu
|
|||
# test-cert.p12 created with:
|
||||
#
|
||||
# openssl pkcs12 -export \
|
||||
# -in test_key_and_cert.pem \
|
||||
# -inkey test_key_and_cert.pem \
|
||||
# -certfile test_ca_cert.pem \
|
||||
# -name "test-pkcs12" \
|
||||
# -out test-cert.p12
|
||||
# -in test_key_and_cert.pem \
|
||||
# -inkey test_key_and_cert.pem \
|
||||
# -certfile test_ca_cert.pem \
|
||||
# -name "test-pkcs12" \
|
||||
# -out test-cert.p12
|
||||
|
||||
EXTRA_DIST += \
|
||||
libnm-core/tests/certs/ca-no-ending-newline.pem \
|
||||
|
|
|
|||
2
NEWS
2
NEWS
|
|
@ -921,7 +921,7 @@ Overview of changes since NetworkManager-0.4.1
|
|||
default action.
|
||||
* Fix icon animation smoothness
|
||||
* Display more data in the Connection Information dialog
|
||||
(Robert Love)
|
||||
(Robert Love).
|
||||
|
||||
|
||||
============================================
|
||||
|
|
|
|||
4
TODO
4
TODO
|
|
@ -19,7 +19,7 @@ The first is the largest obstacle, but ideally we implement this and enable it
|
|||
when we have the required glib and libsoup versions available. One other
|
||||
complication is that this checking should be done during the
|
||||
NM_DEVICE_STATE_IP_CHECK phase (along with other operations like WiFi hotspot
|
||||
auto-login) while the current checks are done globally in nm-manager.c, so
|
||||
auto-login) while the current checks are done globally in nm-manager.c, so
|
||||
keeping both code paths might be complex.
|
||||
|
||||
But ideally, once the device has successfully gotten an IPv4 or IPv6 address, it
|
||||
|
|
@ -235,7 +235,7 @@ proceeds with the connection.
|
|||
|
||||
NM sends the correct wpa_supplicant config for WPS to the supplicant, and waits
|
||||
for the connection to occur. WPS can only be used the *first* time, so after a
|
||||
first successfull connection, NM must request the actual hexadecimal PSK from
|
||||
first successfull connection, NM must request the actual hexadecimal PSK from
|
||||
wpa_supplicant via D-Bus, and store that PSK in the connection, clear any WPS
|
||||
PIN code from the connection, and save the connection to backing storage.
|
||||
|
||||
|
|
|
|||
|
|
@ -6776,7 +6776,7 @@ confirm_connection_saving (NMConnection *local, NMConnection *remote)
|
|||
return confirmed;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
typedef struct {
|
||||
guint level;
|
||||
char *main_prompt;
|
||||
NMSetting *curr_setting;
|
||||
|
|
|
|||
|
|
@ -524,7 +524,7 @@ nmc_count_color_escape_chars (const char *start, const char *end)
|
|||
inside = TRUE;
|
||||
if (inside)
|
||||
num++;
|
||||
if (*start == 'm')
|
||||
if (*start == 'm')
|
||||
inside = FALSE;
|
||||
start++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ adjust_border_for_allocation (NmtNewtSectionPrivate *priv,
|
|||
label = nmt_newt_label_new (line_glyph);
|
||||
g_ptr_array_add (priv->border_line_labels, label);
|
||||
nmt_newt_grid_add (NMT_NEWT_GRID (priv->border_grid), label, 0, i + 1);
|
||||
} else
|
||||
} else
|
||||
nmt_newt_widget_set_visible (priv->border_line_labels->pdata[i], TRUE);
|
||||
}
|
||||
nmt_newt_widget_set_visible (priv->border_end_label, TRUE);
|
||||
|
|
|
|||
|
|
@ -376,5 +376,5 @@ nmt_newt_edit_string (const char *data)
|
|||
g_free (filename);
|
||||
|
||||
return new_data;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ nmt_newt_widget_real_activated (NmtNewtWidget *widget)
|
|||
|
||||
if (priv->exit_on_activate)
|
||||
nmt_newt_form_quit (nmt_newt_widget_get_form (widget));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* nmt_newt_widget_activated:
|
||||
|
|
@ -363,7 +363,7 @@ nmt_newt_widget_set_exit_on_activate (NmtNewtWidget *widget,
|
|||
priv->exit_on_activate = exit_on_activate;
|
||||
g_object_notify (G_OBJECT (widget), "exit-on-activate");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* nmt_newt_widget_get_visible:
|
||||
|
|
|
|||
|
|
@ -502,7 +502,7 @@ nmt_edit_connection_list_class_init (NmtEditConnectionListClass *list_class)
|
|||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
|
||||
|
||||
/**
|
||||
* NmtEditConnectionListFilter:
|
||||
* @list: the #NmtEditConnectionList
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ typedef struct {
|
|||
* Creates a new #NmtEditorGrid
|
||||
*
|
||||
* Returns: a new #NmtEditorGrid
|
||||
*/
|
||||
*/
|
||||
NmtNewtWidget *
|
||||
nmt_editor_grid_new (void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -203,21 +203,21 @@ slaves_changed (GObject *object,
|
|||
nmt_newt_component_set_sensitive (NMT_NEWT_COMPONENT (priv->mode), TRUE);
|
||||
}
|
||||
|
||||
#define WIDGET_CHANGED_FUNC(widget, func, option) \
|
||||
static void \
|
||||
widget ## _widget_changed (GObject *object, \
|
||||
GParamSpec *pspec, \
|
||||
gpointer user_data) \
|
||||
{ \
|
||||
NmtPageBond *bond = NMT_PAGE_BOND (user_data); \
|
||||
NmtPageBondPrivate *priv = NMT_PAGE_BOND_GET_PRIVATE (bond); \
|
||||
\
|
||||
if (priv->updating) \
|
||||
return; \
|
||||
\
|
||||
priv->updating = TRUE; \
|
||||
nm_setting_bond_add_option (priv->s_bond, option, func (priv->widget)); \
|
||||
priv->updating = FALSE; \
|
||||
#define WIDGET_CHANGED_FUNC(widget, func, option) \
|
||||
static void \
|
||||
widget ## _widget_changed (GObject *object, \
|
||||
GParamSpec *pspec, \
|
||||
gpointer user_data) \
|
||||
{ \
|
||||
NmtPageBond *bond = NMT_PAGE_BOND (user_data); \
|
||||
NmtPageBondPrivate *priv = NMT_PAGE_BOND_GET_PRIVATE (bond); \
|
||||
\
|
||||
if (priv->updating) \
|
||||
return; \
|
||||
\
|
||||
priv->updating = TRUE; \
|
||||
nm_setting_bond_add_option (priv->s_bond, option, func (priv->widget)); \
|
||||
priv->updating = FALSE; \
|
||||
}
|
||||
|
||||
WIDGET_CHANGED_FUNC (primary, nmt_newt_entry_get_text, NM_SETTING_BOND_OPTION_PRIMARY)
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ edit_clicked (NmtNewtButton *button,
|
|||
NM_SETTING_TEAM_PORT_CONFIG, new_config,
|
||||
NULL);
|
||||
g_free (new_config);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
nmt_page_team_port_constructed (GObject *object)
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ edit_clicked (NmtNewtButton *button,
|
|||
NM_SETTING_TEAM_CONFIG, new_config,
|
||||
NULL);
|
||||
g_free (new_config);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
nmt_page_team_constructed (GObject *object)
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ static newtComponent
|
|||
nmt_route_entry_get_focus_component (NmtNewtWidget *widget)
|
||||
{
|
||||
NmtRouteEntryPrivate *priv = NMT_ROUTE_ENTRY_GET_PRIVATE (widget);
|
||||
|
||||
|
||||
return nmt_newt_widget_get_focus_component (priv->dest);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
*
|
||||
* When the async callback is invoked, it should call
|
||||
* nmt_sync_op_complete_boolean() or nmt_sync_op_complete_pointer() to
|
||||
* return a result or an error to the caller.
|
||||
* return a result or an error to the caller.
|
||||
*
|
||||
* There is no free/clear function; any memory that needs to be freed
|
||||
* will have been returned to the caller from
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ function handle_generic_unquote(t, option, value)
|
|||
end
|
||||
function handle_number(t, option, value)
|
||||
if not value[2] then io.stderr:write(string.format("Warning: ignoring invalid option '%s'\n", value[1])) return end
|
||||
if not tonumber(value[2]) then
|
||||
if not tonumber(value[2]) then
|
||||
io.stderr:write(string.format("Warning: ignoring not numeric value '%s' for option '%s'\n", value[2], value[1]))
|
||||
return
|
||||
end
|
||||
|
|
|
|||
|
|
@ -604,7 +604,7 @@ find_scripts (const char *str_action)
|
|||
|
||||
while ((filename = g_dir_read_name (dir))) {
|
||||
char *path;
|
||||
struct stat st;
|
||||
struct stat st;
|
||||
int err;
|
||||
const char *err_msg = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,18 +49,18 @@ extra_files = libnm-glib.png
|
|||
|
||||
# CFLAGS and LDFLAGS for compiling scan program. Only needed
|
||||
# if $(DOC_MODULE).types is non-empty.
|
||||
GTKDOC_CFLAGS = \
|
||||
-I$(top_srcdir)/shared \
|
||||
GTKDOC_CFLAGS = \
|
||||
-I$(top_srcdir)/shared \
|
||||
-I$(top_builddir)/shared \
|
||||
-I$(top_srcdir)/libnm-util \
|
||||
-I$(top_builddir)/libnm-util \
|
||||
-I$(top_srcdir)/libnm-glib \
|
||||
-I$(top_builddir)/libnm-glib \
|
||||
-I$(top_srcdir)/libnm-util \
|
||||
-I$(top_builddir)/libnm-util \
|
||||
-I$(top_srcdir)/libnm-glib \
|
||||
-I$(top_builddir)/libnm-glib \
|
||||
-DNM_VERSION_MIN_REQUIRED=NM_VERSION_0_9_8 \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(DBUS_CFLAGS)
|
||||
|
||||
GTKDOC_LIBS = \
|
||||
GTKDOC_LIBS = \
|
||||
$(top_builddir)/libnm-glib/libnm-glib.la \
|
||||
$(GLIB_LIBS)
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ IGNORE_HFILES= \
|
|||
nm-version.h
|
||||
|
||||
# Images to copy into HTML directory.
|
||||
HTML_IMAGES =
|
||||
HTML_IMAGES =
|
||||
|
||||
# Extra XML files that are included by $(DOC_MAIN_SGML_FILE).
|
||||
content_files = version.xml
|
||||
|
|
@ -48,10 +48,10 @@ extra_files =
|
|||
|
||||
# CFLAGS and LDFLAGS for compiling scan program. Only needed
|
||||
# if $(DOC_MODULE).types is non-empty.
|
||||
GTKDOC_CFLAGS = \
|
||||
-I$(top_srcdir)/libnm-util \
|
||||
GTKDOC_CFLAGS = \
|
||||
-I$(top_srcdir)/libnm-util \
|
||||
-DNM_VERSION_MIN_REQUIRED=NM_VERSION_0_9_8 \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(DBUS_CFLAGS)
|
||||
|
||||
GTKDOC_LIBS = \
|
||||
|
|
|
|||
|
|
@ -66,15 +66,15 @@ extra_files = libnm.png
|
|||
|
||||
# CFLAGS and LDFLAGS for compiling scan program. Only needed
|
||||
# if $(DOC_MODULE).types is non-empty.
|
||||
GTKDOC_CFLAGS = \
|
||||
-I$(top_srcdir)/libnm-core \
|
||||
-I$(top_builddir)/libnm-core \
|
||||
-I$(top_srcdir)/libnm \
|
||||
-I$(top_builddir)/libnm \
|
||||
GTKDOC_CFLAGS = \
|
||||
-I$(top_srcdir)/libnm-core \
|
||||
-I$(top_builddir)/libnm-core \
|
||||
-I$(top_srcdir)/libnm \
|
||||
-I$(top_builddir)/libnm \
|
||||
-DNM_VERSION_MIN_REQUIRED=NM_VERSION_0_9_8 \
|
||||
$(GLIB_CFLAGS)
|
||||
|
||||
GTKDOC_LIBS = \
|
||||
GTKDOC_LIBS = \
|
||||
$(top_builddir)/libnm/libnm.la \
|
||||
$(GLIB_LIBS)
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ show_access_point_info (NMAccessPoint *ap)
|
|||
{
|
||||
guint32 flags, wpa_flags, rsn_flags, freq, bitrate;
|
||||
guint8 strength;
|
||||
GBytes *ssid;
|
||||
GBytes *ssid;
|
||||
const char *hwaddr;
|
||||
NM80211Mode mode;
|
||||
char *freq_str, *ssid_str, *bitrate_str, *strength_str, *wpa_flags_str, *rsn_flags_str;
|
||||
|
|
@ -158,7 +158,7 @@ show_wifi_device_info (NMDevice *device)
|
|||
const char *iface;
|
||||
const char *driver;
|
||||
guint32 speed;
|
||||
GBytes *active_ssid;
|
||||
GBytes *active_ssid;
|
||||
char *active_ssid_str = NULL;
|
||||
int i;
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ for d in devices:
|
|||
print("============================")
|
||||
|
||||
print("Interface: %s" % props['Interface'])
|
||||
try:
|
||||
try:
|
||||
devtype = devtypes[props['DeviceType']]
|
||||
except KeyError:
|
||||
devtype = "Unknown"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
# Update() method. The method replaces all previous settings with new ones
|
||||
# including possible secrets.
|
||||
# So, we get all settings using GetSettings() and then find out what secrets
|
||||
# are associated with the connection using GetSecrets(), ask for new secret
|
||||
# are associated with the connection using GetSecrets(), ask for new secret
|
||||
# values, and add them to the settings that we pass to Update().
|
||||
#
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ con = find_connection(sys.argv[1])
|
|||
print("Connection found: " + con_path)
|
||||
|
||||
if con:
|
||||
# Obtain new secrets and put then into connection dict
|
||||
# Obtain new secrets and put then into connection dict
|
||||
change_secrets(con_path, con)
|
||||
|
||||
# Change the connection with Update()
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ def activate_connection(connection_path, device_path):
|
|||
iface = dbus.Interface(proxy, dbus_interface='org.freedesktop.NetworkManager')
|
||||
iface.ActivateConnection('org.freedesktop.NetworkManager',
|
||||
connection_path,
|
||||
device_path,
|
||||
device_path,
|
||||
"/",
|
||||
reply_handler=reply_handler,
|
||||
error_handler=error_handler)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ con = dbus.Dictionary({
|
|||
'ipv6': s_ip6
|
||||
})
|
||||
|
||||
def usage():
|
||||
def usage():
|
||||
print("Usage: %s <ifname> [up|down]" % sys.argv[0])
|
||||
sys.exit(0)
|
||||
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ from gi.repository import GLib, NM
|
|||
|
||||
#
|
||||
# This example shows how to get NMIP4Config from NMDevice after it is activated.
|
||||
#
|
||||
#
|
||||
# We listen to notify::ip4-config glib signal. This signal is trigered by D-Bus
|
||||
# PropertiesChanged for IP4Config that comes after StateChanged for NMDevice.
|
||||
#
|
||||
|
||||
main_loop = None
|
||||
|
||||
|
||||
def do_notify(self, property):
|
||||
print("notify: %s" % property)
|
||||
ip4cfg = self.get_ip4_config()
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
# Sets NM logging level and/or domains (see description in 'man NetworkManager.conf')
|
||||
# The level controls how verbose NM's log output will be (err,warn,info,debug).
|
||||
# Domains control what parts of networking NM emits log messages for. Leaving
|
||||
# either of the two arguments blank (i.e., an empty string) will leave that
|
||||
# either of the two arguments blank (i.e., an empty string) will leave that
|
||||
# parameter unchanged.
|
||||
#
|
||||
# The normal logging level is 'info', for debugging use 'debug'.
|
||||
|
|
|
|||
|
|
@ -2455,7 +2455,7 @@ nm_connection_get_setting_ovs_patch (NMConnection *connection)
|
|||
{
|
||||
return _connection_get_setting_check (connection, NM_TYPE_SETTING_OVS_PATCH);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* nm_connection_get_setting_ovs_port:
|
||||
* @connection: the #NMConnection
|
||||
|
|
|
|||
|
|
@ -590,7 +590,7 @@ typedef struct {
|
|||
/* A table of keys that require further parsing/conversion because they are
|
||||
* stored in a format that can't be automatically read using the key's type.
|
||||
* i.e. IPv4 addresses, which are stored in NetworkManager as guint32, but are
|
||||
* stored in keyfiles as strings, eg "10.1.1.2" or IPv6 addresses stored
|
||||
* stored in keyfiles as strings, eg "10.1.1.2" or IPv6 addresses stored
|
||||
* in struct in6_addr internally, but as string in keyfiles.
|
||||
*/
|
||||
static KeyWriter key_writers[] = {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ static const char* _link_watcher_name[] = {
|
|||
struct NMTeamLinkWatcher {
|
||||
guint refcount;
|
||||
|
||||
guint8 type; /* LinkWatcherTypes */
|
||||
guint8 type; /* LinkWatcherTypes */
|
||||
|
||||
/*
|
||||
* The union is constructed in order to allow mapping the options of all the
|
||||
|
|
|
|||
|
|
@ -179,4 +179,4 @@ void nm_vpn_editor_plugin_set_plugin_info (NMVpnEditorPlugin *plugin
|
|||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __NM_VPN_EDITOR_PLUGIN_H__ */
|
||||
#endif /* __NM_VPN_EDITOR_PLUGIN_H__ */
|
||||
|
|
|
|||
|
|
@ -47,12 +47,12 @@ test_wireless_enabled (NMClient *client)
|
|||
wireless = nm_client_wireless_get_enabled (client);
|
||||
g_print ("Wireless enabled? %s\n", wireless ? "yes" : "no");
|
||||
|
||||
// nm_client_wireless_set_enabled (client, !wireless);
|
||||
// nm_client_wireless_set_enabled (client, !wireless);
|
||||
|
||||
wireless = nm_client_wireless_hardware_get_enabled (client);
|
||||
g_print ("Wireless HW enabled? %s\n", wireless ? "yes" : "no");
|
||||
|
||||
// nm_client_wireless_set_enabled (client, !wireless);
|
||||
// nm_client_wireless_set_enabled (client, !wireless);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,37 +32,37 @@
|
|||
#include "NetworkManager.h"
|
||||
#include "libnm_glib.h"
|
||||
|
||||
#define DBUS_NO_SERVICE_ERROR "org.freedesktop.DBus.Error.ServiceDoesNotExist"
|
||||
#define DBUS_NO_SERVICE_ERROR "org.freedesktop.DBus.Error.ServiceDoesNotExist"
|
||||
|
||||
|
||||
struct libnm_glib_ctx
|
||||
{
|
||||
unsigned char check;
|
||||
unsigned char check;
|
||||
|
||||
GMainContext * g_main_ctx;
|
||||
GMainLoop * g_main_loop;
|
||||
DBusConnection * dbus_con;
|
||||
guint dbus_watcher;
|
||||
guint dbus_watch_interval;
|
||||
GMainContext * g_main_ctx;
|
||||
GMainLoop * g_main_loop;
|
||||
DBusConnection * dbus_con;
|
||||
guint dbus_watcher;
|
||||
guint dbus_watch_interval;
|
||||
|
||||
gboolean thread_done;
|
||||
gboolean thread_inited;
|
||||
GThread * thread;
|
||||
gboolean thread_done;
|
||||
gboolean thread_inited;
|
||||
GThread * thread;
|
||||
|
||||
GSList * callbacks;
|
||||
GMutex * callbacks_lock;
|
||||
guint callback_id_last;
|
||||
GSList * callbacks;
|
||||
GMutex * callbacks_lock;
|
||||
guint callback_id_last;
|
||||
|
||||
libnm_glib_state nm_state;
|
||||
libnm_glib_state nm_state;
|
||||
};
|
||||
|
||||
typedef struct libnm_glib_callback
|
||||
{
|
||||
guint id;
|
||||
GMainContext * gmain_ctx;
|
||||
libnm_glib_ctx * libnm_glib_ctx;
|
||||
libnm_glib_callback_func func;
|
||||
gpointer user_data;
|
||||
guint id;
|
||||
GMainContext * gmain_ctx;
|
||||
libnm_glib_ctx * libnm_glib_ctx;
|
||||
libnm_glib_callback_func func;
|
||||
gpointer user_data;
|
||||
} libnm_glib_callback;
|
||||
|
||||
|
||||
|
|
@ -74,9 +74,9 @@ static void _libnm_glib_update_state (libnm_glib_ctx *ctx, NMState state);
|
|||
static void
|
||||
_libnm_glib_nm_state_cb (DBusPendingCall *pcall, void *user_data)
|
||||
{
|
||||
DBusMessage * reply;
|
||||
libnm_glib_ctx * ctx = (libnm_glib_ctx *) user_data;
|
||||
NMState nm_state;
|
||||
DBusMessage *reply;
|
||||
libnm_glib_ctx *ctx = (libnm_glib_ctx *) user_data;
|
||||
NMState nm_state;
|
||||
|
||||
g_return_if_fail (pcall != NULL);
|
||||
g_return_if_fail (ctx != NULL);
|
||||
|
|
@ -108,8 +108,8 @@ out:
|
|||
static void
|
||||
_libnm_glib_get_nm_state (libnm_glib_ctx *ctx)
|
||||
{
|
||||
DBusMessage * message;
|
||||
DBusPendingCall * pcall = NULL;
|
||||
DBusMessage *message;
|
||||
DBusPendingCall *pcall = NULL;
|
||||
|
||||
g_return_if_fail (ctx != NULL);
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ _libnm_glib_get_nm_state (libnm_glib_ctx *ctx)
|
|||
static gboolean
|
||||
_libnm_glib_callback_helper (gpointer user_data)
|
||||
{
|
||||
libnm_glib_callback *cb_data = (libnm_glib_callback *)user_data;
|
||||
libnm_glib_callback *cb_data = (libnm_glib_callback *)user_data;
|
||||
|
||||
g_return_val_if_fail (cb_data != NULL, FALSE);
|
||||
g_return_val_if_fail (cb_data->func != NULL, FALSE);
|
||||
|
|
@ -140,7 +140,7 @@ static void
|
|||
_libnm_glib_schedule_single_callback (libnm_glib_ctx *ctx,
|
||||
libnm_glib_callback *callback)
|
||||
{
|
||||
GSource *source;
|
||||
GSource *source;
|
||||
|
||||
g_return_if_fail (ctx != NULL);
|
||||
g_return_if_fail (callback != NULL);
|
||||
|
|
@ -170,7 +170,7 @@ _libnm_glib_unschedule_single_callback (libnm_glib_ctx *ctx,
|
|||
static void
|
||||
_libnm_glib_call_callbacks (libnm_glib_ctx *ctx)
|
||||
{
|
||||
GSList *elem;
|
||||
GSList *elem;
|
||||
|
||||
g_return_if_fail (ctx != NULL);
|
||||
|
||||
|
|
@ -188,7 +188,7 @@ _libnm_glib_call_callbacks (libnm_glib_ctx *ctx)
|
|||
static void
|
||||
_libnm_glib_update_state (libnm_glib_ctx *ctx, NMState state)
|
||||
{
|
||||
libnm_glib_state old_state;
|
||||
libnm_glib_state old_state;
|
||||
|
||||
g_return_if_fail (ctx != NULL);
|
||||
|
||||
|
|
@ -221,9 +221,9 @@ _libnm_glib_dbus_filter (DBusConnection *connection,
|
|||
DBusMessage *message,
|
||||
void *user_data)
|
||||
{
|
||||
libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
|
||||
gboolean handled = TRUE;
|
||||
DBusError error;
|
||||
libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
|
||||
gboolean handled = TRUE;
|
||||
DBusError error;
|
||||
|
||||
g_return_val_if_fail (ctx != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
|
||||
g_return_val_if_fail (connection != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
|
||||
|
|
@ -242,9 +242,9 @@ _libnm_glib_dbus_filter (DBusConnection *connection,
|
|||
else if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged"))
|
||||
{
|
||||
/* New signal for dbus 0.23... */
|
||||
char *service;
|
||||
char *old_owner;
|
||||
char *new_owner;
|
||||
char *service;
|
||||
char *old_owner;
|
||||
char *new_owner;
|
||||
|
||||
if ( dbus_message_get_args (message, &error,
|
||||
DBUS_TYPE_STRING, &service,
|
||||
|
|
@ -257,9 +257,9 @@ _libnm_glib_dbus_filter (DBusConnection *connection,
|
|||
gboolean old_owner_good = (old_owner && (strlen (old_owner) > 0));
|
||||
gboolean new_owner_good = (new_owner && (strlen (new_owner) > 0));
|
||||
|
||||
if (!old_owner_good && new_owner_good) /* Equivalent to old ServiceCreated signal */
|
||||
if (!old_owner_good && new_owner_good) /* Equivalent to old ServiceCreated signal */
|
||||
_libnm_glib_get_nm_state (ctx);
|
||||
else if (old_owner_good && !new_owner_good) /* Equivalent to old ServiceDeleted signal */
|
||||
else if (old_owner_good && !new_owner_good) /* Equivalent to old ServiceDeleted signal */
|
||||
ctx->nm_state = LIBNM_NO_NETWORKMANAGER;
|
||||
}
|
||||
}
|
||||
|
|
@ -273,7 +273,7 @@ _libnm_glib_dbus_filter (DBusConnection *connection,
|
|||
}
|
||||
else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "StateChanged"))
|
||||
{
|
||||
NMState state = NM_STATE_UNKNOWN;
|
||||
NMState state = NM_STATE_UNKNOWN;
|
||||
|
||||
dbus_message_get_args (message, &error, DBUS_TYPE_UINT32, &state, DBUS_TYPE_INVALID);
|
||||
_libnm_glib_update_state (ctx, state);
|
||||
|
|
@ -297,8 +297,8 @@ _libnm_glib_dbus_filter (DBusConnection *connection,
|
|||
static DBusConnection *
|
||||
_libnm_glib_dbus_init (gpointer *user_data, GMainContext *context)
|
||||
{
|
||||
DBusConnection *connection = NULL;
|
||||
DBusError error;
|
||||
DBusConnection *connection = NULL;
|
||||
DBusError error;
|
||||
|
||||
dbus_error_init (&error);
|
||||
connection = dbus_bus_get_private (DBUS_BUS_SYSTEM, &error);
|
||||
|
|
@ -349,7 +349,7 @@ _libnm_glib_dbus_init (gpointer *user_data, GMainContext *context)
|
|||
static gboolean
|
||||
_libnm_glib_dbus_watcher (gpointer user_data)
|
||||
{
|
||||
libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
|
||||
libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
|
||||
|
||||
g_return_val_if_fail (ctx != NULL, FALSE);
|
||||
|
||||
|
|
@ -369,7 +369,7 @@ _libnm_glib_dbus_watcher (gpointer user_data)
|
|||
/* Wait 3 seconds longer each time we fail to reconnect to dbus,
|
||||
* with a maximum wait of one minute.
|
||||
*/
|
||||
ctx->dbus_watch_interval = MIN(ctx->dbus_watch_interval + 3000, 60000);
|
||||
ctx->dbus_watch_interval = MIN(ctx->dbus_watch_interval + 3000, 60000);
|
||||
|
||||
/* Reschule ourselves if we _still_ don't have a connection to dbus */
|
||||
_libnm_glib_schedule_dbus_watcher (ctx);
|
||||
|
|
@ -393,7 +393,7 @@ _libnm_glib_schedule_dbus_watcher (libnm_glib_ctx *ctx)
|
|||
|
||||
if (ctx->dbus_watcher == 0)
|
||||
{
|
||||
GSource * source = g_timeout_source_new (ctx->dbus_watch_interval);
|
||||
GSource *source = g_timeout_source_new (ctx->dbus_watch_interval);
|
||||
g_source_set_callback (source, _libnm_glib_dbus_watcher, (gpointer) ctx, NULL);
|
||||
ctx->dbus_watcher = g_source_attach (source, ctx->g_main_ctx);
|
||||
g_source_unref (source);
|
||||
|
|
@ -410,7 +410,7 @@ _libnm_glib_schedule_dbus_watcher (libnm_glib_ctx *ctx)
|
|||
static gpointer
|
||||
_libnm_glib_dbus_worker (gpointer user_data)
|
||||
{
|
||||
libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
|
||||
libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
|
||||
|
||||
g_return_val_if_fail (ctx != NULL, NULL);
|
||||
|
||||
|
|
@ -493,7 +493,7 @@ error:
|
|||
libnm_glib_ctx *
|
||||
libnm_glib_init (void)
|
||||
{
|
||||
libnm_glib_ctx *ctx = NULL;
|
||||
libnm_glib_ctx *ctx = NULL;
|
||||
|
||||
if (!g_thread_supported ())
|
||||
g_thread_init (NULL);
|
||||
|
|
@ -504,7 +504,7 @@ libnm_glib_init (void)
|
|||
|
||||
ctx->thread = g_thread_create (_libnm_glib_dbus_worker, ctx, TRUE, NULL);
|
||||
if (!ctx->thread)
|
||||
goto error;
|
||||
goto error;
|
||||
|
||||
/* Wait until initialization of the thread */
|
||||
while (!ctx->thread_inited)
|
||||
|
|
@ -542,12 +542,12 @@ libnm_glib_get_network_state (const libnm_glib_ctx *ctx)
|
|||
|
||||
|
||||
guint
|
||||
libnm_glib_register_callback (libnm_glib_ctx *ctx,
|
||||
libnm_glib_callback_func func,
|
||||
gpointer user_data,
|
||||
GMainContext *g_main_ctx)
|
||||
libnm_glib_register_callback (libnm_glib_ctx *ctx,
|
||||
libnm_glib_callback_func func,
|
||||
gpointer user_data,
|
||||
GMainContext *g_main_ctx)
|
||||
{
|
||||
libnm_glib_callback *callback = NULL;
|
||||
libnm_glib_callback *callback = NULL;
|
||||
|
||||
g_return_val_if_fail (ctx != NULL, 0);
|
||||
g_return_val_if_fail (func != NULL, 0);
|
||||
|
|
|
|||
|
|
@ -664,7 +664,7 @@ nm_access_point_class_init (NMAccessPointClass *ap_class)
|
|||
NULL,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
|
||||
|
||||
/**
|
||||
* NMAccessPoint:mode:
|
||||
*
|
||||
|
|
|
|||
|
|
@ -78,13 +78,13 @@ nm_vpn_plugin_ui_interface_get_type (void)
|
|||
if (!vpn_plugin_ui_interface_type) {
|
||||
const GTypeInfo vpn_plugin_ui_interface_info = {
|
||||
sizeof (NMVpnPluginUiInterface), /* class_size */
|
||||
interface_init, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
interface_init, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
NULL,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
0,
|
||||
0, /* n_preallocs */
|
||||
0, /* n_preallocs */
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -197,13 +197,13 @@ nm_vpn_plugin_ui_widget_interface_get_type (void)
|
|||
if (!vpn_plugin_ui_widget_interface_type) {
|
||||
const GTypeInfo vpn_plugin_ui_widget_interface_info = {
|
||||
sizeof (NMVpnPluginUiWidgetInterface), /* class_size */
|
||||
widget_interface_init, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
widget_interface_init, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
NULL,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
0,
|
||||
0, /* n_preallocs */
|
||||
0, /* n_preallocs */
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -272,4 +272,4 @@ gboolean nm_vpn_plugin_ui_widget_interface_save_secrets (NMVpnPluginUiWidgetInte
|
|||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* NM_VPN_PLUGIN_UI_INTERFACE_H */
|
||||
#endif /* NM_VPN_PLUGIN_UI_INTERFACE_H */
|
||||
|
|
|
|||
|
|
@ -947,7 +947,7 @@ nm_setting_wired_class_init (NMSettingWiredClass *setting_class)
|
|||
G_PARAM_READWRITE |
|
||||
NM_SETTING_PARAM_INFERRABLE |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
|
||||
|
||||
/**
|
||||
* NMSettingWired:mac-address-blacklist:
|
||||
*
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ struct EncodingTriplet
|
|||
|
||||
struct IsoLangToEncodings
|
||||
{
|
||||
const char * lang;
|
||||
const char *lang;
|
||||
struct EncodingTriplet encodings;
|
||||
};
|
||||
|
||||
|
|
@ -63,13 +63,13 @@ struct IsoLangToEncodings
|
|||
static const struct IsoLangToEncodings isoLangEntries5[] =
|
||||
{
|
||||
/* Simplified Chinese */
|
||||
{ "zh_cn", {"euc-cn", "gb2312", "gb18030"} }, /* PRC */
|
||||
{ "zh_sg", {"euc-cn", "gb2312", "gb18030"} }, /* Singapore */
|
||||
{ "zh_cn", {"euc-cn", "gb2312", "gb18030"} }, /* PRC */
|
||||
{ "zh_sg", {"euc-cn", "gb2312", "gb18030"} }, /* Singapore */
|
||||
|
||||
/* Traditional Chinese */
|
||||
{ "zh_tw", {"big5", "euc-tw", NULL} }, /* Taiwan */
|
||||
{ "zh_hk", {"big5", "euc-tw", "big5-hkcs"} },/* Hong Kong */
|
||||
{ "zh_mo", {"big5", "euc-tw", NULL} }, /* Macau */
|
||||
{ "zh_tw", {"big5", "euc-tw", NULL} }, /* Taiwan */
|
||||
{ "zh_hk", {"big5", "euc-tw", "big5-hkcs"} },/* Hong Kong */
|
||||
{ "zh_mo", {"big5", "euc-tw", NULL} }, /* Macau */
|
||||
|
||||
/* Table end */
|
||||
{ NULL, {NULL, NULL, NULL} }
|
||||
|
|
@ -79,49 +79,49 @@ static const struct IsoLangToEncodings isoLangEntries5[] =
|
|||
static const struct IsoLangToEncodings isoLangEntries2[] =
|
||||
{
|
||||
/* Japanese */
|
||||
{ "ja", {"euc-jp", "shift_jis", "iso-2022-jp"} },
|
||||
{ "ja", {"euc-jp", "shift_jis", "iso-2022-jp"} },
|
||||
|
||||
/* Korean */
|
||||
{ "ko", {"euc-kr", "iso-2022-kr", "johab"} },
|
||||
{ "ko", {"euc-kr", "iso-2022-kr", "johab"} },
|
||||
|
||||
/* Thai */
|
||||
{ "th", {"iso-8859-11","windows-874", NULL} },
|
||||
{ "th", {"iso-8859-11","windows-874", NULL} },
|
||||
|
||||
/* Central European */
|
||||
{ "hu", {"iso-8859-2", "windows-1250", NULL} }, /* Hungarian */
|
||||
{ "cs", {"iso-8859-2", "windows-1250", NULL} }, /* Czech */
|
||||
{ "hr", {"iso-8859-2", "windows-1250", NULL} }, /* Croatian */
|
||||
{ "pl", {"iso-8859-2", "windows-1250", NULL} }, /* Polish */
|
||||
{ "ro", {"iso-8859-2", "windows-1250", NULL} }, /* Romanian */
|
||||
{ "sk", {"iso-8859-2", "windows-1250", NULL} }, /* Slovakian */
|
||||
{ "sl", {"iso-8859-2", "windows-1250", NULL} }, /* Slovenian */
|
||||
{ "sh", {"iso-8859-2", "windows-1250", NULL} }, /* Serbo-Croatian */
|
||||
{ "hu", {"iso-8859-2", "windows-1250", NULL} }, /* Hungarian */
|
||||
{ "cs", {"iso-8859-2", "windows-1250", NULL} }, /* Czech */
|
||||
{ "hr", {"iso-8859-2", "windows-1250", NULL} }, /* Croatian */
|
||||
{ "pl", {"iso-8859-2", "windows-1250", NULL} }, /* Polish */
|
||||
{ "ro", {"iso-8859-2", "windows-1250", NULL} }, /* Romanian */
|
||||
{ "sk", {"iso-8859-2", "windows-1250", NULL} }, /* Slovakian */
|
||||
{ "sl", {"iso-8859-2", "windows-1250", NULL} }, /* Slovenian */
|
||||
{ "sh", {"iso-8859-2", "windows-1250", NULL} }, /* Serbo-Croatian */
|
||||
|
||||
/* Cyrillic */
|
||||
{ "ru", {"koi8-r", "windows-1251", "iso-8859-5"} }, /* Russian */
|
||||
{ "be", {"koi8-r", "windows-1251", "iso-8859-5"} }, /* Belorussian */
|
||||
{ "bg", {"windows-1251","koi8-r", "iso-8859-5"} }, /* Bulgarian */
|
||||
{ "mk", {"koi8-r", "windows-1251", "iso-8859-5"} }, /* Macedonian */
|
||||
{ "sr", {"koi8-r", "windows-1251", "iso-8859-5"} }, /* Serbian */
|
||||
{ "uk", {"koi8-u", "koi8-r", "windows-1251"} }, /* Ukranian */
|
||||
{ "ru", {"koi8-r", "windows-1251", "iso-8859-5"} }, /* Russian */
|
||||
{ "be", {"koi8-r", "windows-1251", "iso-8859-5"} }, /* Belorussian */
|
||||
{ "bg", {"windows-1251","koi8-r", "iso-8859-5"} }, /* Bulgarian */
|
||||
{ "mk", {"koi8-r", "windows-1251", "iso-8859-5"} }, /* Macedonian */
|
||||
{ "sr", {"koi8-r", "windows-1251", "iso-8859-5"} }, /* Serbian */
|
||||
{ "uk", {"koi8-u", "koi8-r", "windows-1251"} }, /* Ukranian */
|
||||
|
||||
/* Arabic */
|
||||
{ "ar", {"iso-8859-6", "windows-1256", NULL} },
|
||||
{ "ar", {"iso-8859-6", "windows-1256", NULL} },
|
||||
|
||||
/* Baltic */
|
||||
{ "et", {"iso-8859-4", "windows-1257", NULL} }, /* Estonian */
|
||||
{ "lt", {"iso-8859-4", "windows-1257", NULL} }, /* Lithuanian */
|
||||
{ "lv", {"iso-8859-4", "windows-1257", NULL} }, /* Latvian */
|
||||
{ "et", {"iso-8859-4", "windows-1257", NULL} }, /* Estonian */
|
||||
{ "lt", {"iso-8859-4", "windows-1257", NULL} }, /* Lithuanian */
|
||||
{ "lv", {"iso-8859-4", "windows-1257", NULL} }, /* Latvian */
|
||||
|
||||
/* Greek */
|
||||
{ "el", {"iso-8859-7", "windows-1253", NULL} },
|
||||
{ "el", {"iso-8859-7", "windows-1253", NULL} },
|
||||
|
||||
/* Hebrew */
|
||||
{ "he", {"iso-8859-8", "windows-1255", NULL} },
|
||||
{ "iw", {"iso-8859-8", "windows-1255", NULL} },
|
||||
{ "he", {"iso-8859-8", "windows-1255", NULL} },
|
||||
{ "iw", {"iso-8859-8", "windows-1255", NULL} },
|
||||
|
||||
/* Turkish */
|
||||
{ "tr", {"iso-8859-9", "windows-1254", NULL} },
|
||||
{ "tr", {"iso-8859-9", "windows-1254", NULL} },
|
||||
|
||||
/* Table end */
|
||||
{ NULL, {NULL, NULL, NULL} }
|
||||
|
|
@ -166,9 +166,9 @@ get_encodings_for_lang (const char *lang,
|
|||
char **encoding2,
|
||||
char **encoding3)
|
||||
{
|
||||
struct EncodingTriplet * encodings;
|
||||
gboolean success = FALSE;
|
||||
char * tmp_lang;
|
||||
struct EncodingTriplet *encodings;
|
||||
gboolean success = FALSE;
|
||||
char *tmp_lang;
|
||||
|
||||
g_return_val_if_fail (lang != NULL, FALSE);
|
||||
g_return_val_if_fail (encoding1 != NULL, FALSE);
|
||||
|
|
|
|||
|
|
@ -588,7 +588,7 @@ nm_access_point_class_init (NMAccessPointClass *ap_class)
|
|||
NULL,
|
||||
G_PARAM_READABLE |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
|
||||
|
||||
/**
|
||||
* NMAccessPoint:mode:
|
||||
*
|
||||
|
|
|
|||
|
|
@ -83,4 +83,4 @@ gboolean nm_vpn_editor_update_connection (NMVpnEditor *editor,
|
|||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __NM_VPN_EDITOR_H__ */
|
||||
#endif /* __NM_VPN_EDITOR_H__ */
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
|
|||
],[dnl
|
||||
AC_ARG_ENABLE(introspection,
|
||||
AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
|
||||
[Enable introspection for this build]),,
|
||||
[Enable introspection for this build]),,
|
||||
[enable_introspection=auto])
|
||||
])dnl
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
|
|||
dnl Canonicalize enable_introspection
|
||||
enable_introspection=$found_introspection
|
||||
],dnl
|
||||
[dnl
|
||||
[dnl
|
||||
AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
|
||||
])dnl
|
||||
|
||||
|
|
|
|||
2149
po/ChangeLog
2149
po/ChangeLog
File diff suppressed because it is too large
Load diff
|
|
@ -24,12 +24,12 @@
|
|||
|
||||
#include "nm-device.h"
|
||||
|
||||
#define NM_TYPE_DEVICE_ETHERNET (nm_device_ethernet_get_type ())
|
||||
#define NM_DEVICE_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernet))
|
||||
#define NM_DEVICE_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass))
|
||||
#define NM_IS_DEVICE_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_ETHERNET))
|
||||
#define NM_IS_DEVICE_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_ETHERNET))
|
||||
#define NM_DEVICE_ETHERNET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass))
|
||||
#define NM_TYPE_DEVICE_ETHERNET (nm_device_ethernet_get_type ())
|
||||
#define NM_DEVICE_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernet))
|
||||
#define NM_DEVICE_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass))
|
||||
#define NM_IS_DEVICE_ETHERNET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_ETHERNET))
|
||||
#define NM_IS_DEVICE_ETHERNET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DEVICE_ETHERNET))
|
||||
#define NM_DEVICE_ETHERNET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_ETHERNET, NMDeviceEthernetClass))
|
||||
|
||||
#define NM_DEVICE_ETHERNET_SPEED "speed"
|
||||
#define NM_DEVICE_ETHERNET_S390_SUBCHANNELS "s390-subchannels"
|
||||
|
|
@ -37,12 +37,12 @@
|
|||
struct _NMDeviceEthernetPrivate;
|
||||
|
||||
typedef struct {
|
||||
NMDevice parent;
|
||||
struct _NMDeviceEthernetPrivate *_priv;
|
||||
NMDevice parent;
|
||||
struct _NMDeviceEthernetPrivate *_priv;
|
||||
} NMDeviceEthernet;
|
||||
|
||||
typedef struct {
|
||||
NMDeviceClass parent;
|
||||
NMDeviceClass parent;
|
||||
} NMDeviceEthernetClass;
|
||||
|
||||
GType nm_device_ethernet_get_type (void);
|
||||
|
|
|
|||
|
|
@ -141,4 +141,4 @@ gboolean nm_device_match_hwaddr (NMDevice *device,
|
|||
NMConnection *connection,
|
||||
gboolean fail_if_no_hwaddr);
|
||||
|
||||
#endif /* NM_DEVICE_PRIVATE_H */
|
||||
#endif /* NM_DEVICE_PRIVATE_H */
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ typedef struct _NMDevicePrivate {
|
|||
};
|
||||
NMIP6Config * con_ip6_config; /* config from the setting */
|
||||
AppliedConfig wwan_ip6_config;
|
||||
AppliedConfig ac_ip6_config; /* config from IPv6 autoconfiguration */
|
||||
AppliedConfig ac_ip6_config; /* config from IPv6 autoconfiguration */
|
||||
NMIP6Config * ext_ip6_config; /* Stuff added outside NM */
|
||||
NMIP6Config * ext_ip6_config_captured; /* Configuration captured from platform. */
|
||||
GSList * vpn6_configs; /* VPNs which use this device */
|
||||
|
|
@ -10899,7 +10899,7 @@ start_ping (NMDevice *self,
|
|||
priv->gw_ping.log_domain = log_domain;
|
||||
priv->gw_ping.address = g_strdup (address);
|
||||
priv->gw_ping.binary = g_strdup (binary);
|
||||
priv->gw_ping.deadline = timeout + 10; /* the proper termination is enforced by a timer */
|
||||
priv->gw_ping.deadline = timeout + 10; /* the proper termination is enforced by a timer */
|
||||
|
||||
if (spawn_ping (self)) {
|
||||
priv->gw_ping.watch = g_child_watch_add (priv->gw_ping.pid, ip_check_ping_watch_cb, self);
|
||||
|
|
|
|||
|
|
@ -439,19 +439,19 @@ dhclient_start (NMDhcpClient *client,
|
|||
while (prefixes--)
|
||||
g_ptr_array_add (argv, (gpointer) "-P");
|
||||
}
|
||||
g_ptr_array_add (argv, (gpointer) "-sf"); /* Set script file */
|
||||
g_ptr_array_add (argv, (gpointer) "-sf"); /* Set script file */
|
||||
g_ptr_array_add (argv, (gpointer) nm_dhcp_helper_path);
|
||||
|
||||
if (pid_file) {
|
||||
g_ptr_array_add (argv, (gpointer) "-pf"); /* Set pid file */
|
||||
g_ptr_array_add (argv, (gpointer) "-pf"); /* Set pid file */
|
||||
g_ptr_array_add (argv, (gpointer) pid_file);
|
||||
}
|
||||
|
||||
g_ptr_array_add (argv, (gpointer) "-lf"); /* Set lease file */
|
||||
g_ptr_array_add (argv, (gpointer) "-lf"); /* Set lease file */
|
||||
g_ptr_array_add (argv, (gpointer) priv->lease_file);
|
||||
|
||||
if (priv->conf_file) {
|
||||
g_ptr_array_add (argv, (gpointer) "-cf"); /* Set interface config file */
|
||||
g_ptr_array_add (argv, (gpointer) "-cf"); /* Set interface config file */
|
||||
g_ptr_array_add (argv, (gpointer) priv->conf_file);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,16 +118,16 @@ dhcpcanon_start (NMDhcpClient *client,
|
|||
argv = g_ptr_array_new ();
|
||||
g_ptr_array_add (argv, (gpointer) dhcpcanon_path);
|
||||
|
||||
g_ptr_array_add (argv, (gpointer) "-sf"); /* Set script file */
|
||||
g_ptr_array_add (argv, (gpointer) "-sf"); /* Set script file */
|
||||
g_ptr_array_add (argv, (gpointer) nm_dhcp_helper_path);
|
||||
|
||||
if (pid_file) {
|
||||
g_ptr_array_add (argv, (gpointer) "-pf"); /* Set pid file */
|
||||
g_ptr_array_add (argv, (gpointer) "-pf"); /* Set pid file */
|
||||
g_ptr_array_add (argv, (gpointer) pid_file);
|
||||
}
|
||||
|
||||
if (priv->conf_file) {
|
||||
g_ptr_array_add (argv, (gpointer) "-cf"); /* Set interface config file */
|
||||
g_ptr_array_add (argv, (gpointer) "-cf"); /* Set interface config file */
|
||||
g_ptr_array_add (argv, (gpointer) priv->conf_file);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -114,18 +114,18 @@ ip4_start (NMDhcpClient *client, const char *dhcp_anycast_addr, const char *last
|
|||
argv = g_ptr_array_new ();
|
||||
g_ptr_array_add (argv, (gpointer) dhcpcd_path);
|
||||
|
||||
g_ptr_array_add (argv, (gpointer) "-B"); /* Don't background on lease (disable fork()) */
|
||||
g_ptr_array_add (argv, (gpointer) "-B"); /* Don't background on lease (disable fork()) */
|
||||
|
||||
g_ptr_array_add (argv, (gpointer) "-K"); /* Disable built-in carrier detection */
|
||||
g_ptr_array_add (argv, (gpointer) "-K"); /* Disable built-in carrier detection */
|
||||
|
||||
g_ptr_array_add (argv, (gpointer) "-L"); /* Disable built-in IPv4LL */
|
||||
g_ptr_array_add (argv, (gpointer) "-L"); /* Disable built-in IPv4LL */
|
||||
|
||||
/* --noarp. Don't request or claim the address by ARP; this also disables IPv4LL. */
|
||||
g_ptr_array_add (argv, (gpointer) "-A");
|
||||
|
||||
g_ptr_array_add (argv, (gpointer) "-G"); /* Let NM handle routing */
|
||||
g_ptr_array_add (argv, (gpointer) "-G"); /* Let NM handle routing */
|
||||
|
||||
g_ptr_array_add (argv, (gpointer) "-c"); /* Set script file */
|
||||
g_ptr_array_add (argv, (gpointer) "-c"); /* Set script file */
|
||||
g_ptr_array_add (argv, (gpointer) nm_dhcp_helper_path);
|
||||
|
||||
#ifdef DHCPCD_SUPPORTS_IPV6
|
||||
|
|
|
|||
|
|
@ -754,12 +754,12 @@ test_write_existing_commented_duid (void)
|
|||
|
||||
static const char *interface1_orig = \
|
||||
"interface \"eth0\" {\n"
|
||||
" also request my-option;\n"
|
||||
" initial-delay 5;\n"
|
||||
"\talso request my-option;\n"
|
||||
"\tinitial-delay 5;\n"
|
||||
"}\n"
|
||||
"interface \"eth1\" {\n"
|
||||
" also request another-option;\n"
|
||||
" initial-delay 0;\n"
|
||||
"\talso request another-option;\n"
|
||||
"\tinitial-delay 0;\n"
|
||||
"}\n"
|
||||
"\n"
|
||||
"also request yet-another-option;\n";
|
||||
|
|
@ -798,12 +798,12 @@ test_interface1 (void)
|
|||
|
||||
static const char *interface2_orig = \
|
||||
"interface eth0 {\n"
|
||||
" also request my-option;\n"
|
||||
" initial-delay 5;\n"
|
||||
"\talso request my-option;\n"
|
||||
"\tinitial-delay 5;\n"
|
||||
" }\n"
|
||||
"interface eth1 {\n"
|
||||
" initial-delay 0;\n"
|
||||
" request another-option;\n"
|
||||
"\tinitial-delay 0;\n"
|
||||
"\trequest another-option;\n"
|
||||
" } \n"
|
||||
"\n"
|
||||
"also request yet-another-option;\n";
|
||||
|
|
@ -844,12 +844,12 @@ test_config_req_intf (void)
|
|||
{
|
||||
static const char *const orig = \
|
||||
"request subnet-mask, broadcast-address, routers,\n"
|
||||
" rfc3442-classless-static-routes,\n"
|
||||
" interface-mtu, host-name, domain-name, domain-search,\n"
|
||||
" domain-name-servers, nis-domain, nis-servers,\n"
|
||||
" nds-context, nds-servers, nds-tree-name,\n"
|
||||
" netbios-name-servers, netbios-dd-server,\n"
|
||||
" netbios-node-type, netbios-scope, ntp-servers;\n"
|
||||
"\trfc3442-classless-static-routes,\n"
|
||||
"\tinterface-mtu, host-name, domain-name, domain-search,\n"
|
||||
"\tdomain-name-servers, nis-domain, nis-servers,\n"
|
||||
"\tnds-context, nds-servers, nds-tree-name,\n"
|
||||
"\tnetbios-name-servers, netbios-dd-server,\n"
|
||||
"\tnetbios-node-type, netbios-scope, ntp-servers;\n"
|
||||
"";
|
||||
static const char *const expected = \
|
||||
"# Created by NetworkManager\n"
|
||||
|
|
|
|||
|
|
@ -887,6 +887,23 @@ get_expiry_time (guint32 timestamp, guint32 lifetime)
|
|||
: (_item->lifetime) / 2); \
|
||||
})
|
||||
|
||||
static const char *
|
||||
_get_exp (char *buf, gsize buf_size, gint64 now_ns, gint32 expiry_time)
|
||||
{
|
||||
int l;
|
||||
|
||||
if (expiry_time == G_MAXINT32)
|
||||
return "permanent";
|
||||
l = g_snprintf (buf, buf_size,
|
||||
"%.4f",
|
||||
((double) ((expiry_time * NM_UTILS_NS_PER_SECOND) - now_ns)) / ((double) NM_UTILS_NS_PER_SECOND));
|
||||
nm_assert (l < buf_size);
|
||||
return buf;
|
||||
}
|
||||
|
||||
#define get_exp(buf, now_ns, item) \
|
||||
_get_exp ((buf), G_N_ELEMENTS (buf), (now_ns), (get_expiry (item)))
|
||||
|
||||
static void
|
||||
_config_changed_log (NMNDisc *ndisc, NMNDiscConfigMap changed)
|
||||
{
|
||||
|
|
@ -896,10 +913,14 @@ _config_changed_log (NMNDisc *ndisc, NMNDiscConfigMap changed)
|
|||
char changedstr[CONFIG_MAP_MAX_STR];
|
||||
char addrstr[INET6_ADDRSTRLEN];
|
||||
char str_pref[35];
|
||||
char str_exp[100];
|
||||
gint64 now_ns;
|
||||
|
||||
if (!_LOGD_ENABLED ())
|
||||
return;
|
||||
|
||||
now_ns = nm_utils_get_monotonic_timestamp_ns ();
|
||||
|
||||
priv = NM_NDISC_GET_PRIVATE (ndisc);
|
||||
rdata = &priv->rdata;
|
||||
|
||||
|
|
@ -910,35 +931,38 @@ _config_changed_log (NMNDisc *ndisc, NMNDiscConfigMap changed)
|
|||
NMNDiscGateway *gateway = &g_array_index (rdata->gateways, NMNDiscGateway, i);
|
||||
|
||||
inet_ntop (AF_INET6, &gateway->address, addrstr, sizeof (addrstr));
|
||||
_LOGD (" gateway %s pref %s exp %d", addrstr,
|
||||
_LOGD (" gateway %s pref %s exp %s", addrstr,
|
||||
nm_icmpv6_router_pref_to_string (gateway->preference, str_pref, sizeof (str_pref)),
|
||||
get_expiry (gateway));
|
||||
get_exp (str_exp, now_ns, gateway));
|
||||
}
|
||||
for (i = 0; i < rdata->addresses->len; i++) {
|
||||
NMNDiscAddress *address = &g_array_index (rdata->addresses, NMNDiscAddress, i);
|
||||
|
||||
inet_ntop (AF_INET6, &address->address, addrstr, sizeof (addrstr));
|
||||
_LOGD (" address %s exp %d", addrstr, get_expiry (address));
|
||||
_LOGD (" address %s exp %s", addrstr,
|
||||
get_exp (str_exp, now_ns, address));
|
||||
}
|
||||
for (i = 0; i < rdata->routes->len; i++) {
|
||||
NMNDiscRoute *route = &g_array_index (rdata->routes, NMNDiscRoute, i);
|
||||
|
||||
inet_ntop (AF_INET6, &route->network, addrstr, sizeof (addrstr));
|
||||
_LOGD (" route %s/%u via %s pref %s exp %d", addrstr, (guint) route->plen,
|
||||
_LOGD (" route %s/%u via %s pref %s exp %s", addrstr, (guint) route->plen,
|
||||
nm_utils_inet6_ntop (&route->gateway, NULL),
|
||||
nm_icmpv6_router_pref_to_string (route->preference, str_pref, sizeof (str_pref)),
|
||||
get_expiry (route));
|
||||
get_exp (str_exp, now_ns, route));
|
||||
}
|
||||
for (i = 0; i < rdata->dns_servers->len; i++) {
|
||||
NMNDiscDNSServer *dns_server = &g_array_index (rdata->dns_servers, NMNDiscDNSServer, i);
|
||||
|
||||
inet_ntop (AF_INET6, &dns_server->address, addrstr, sizeof (addrstr));
|
||||
_LOGD (" dns_server %s exp %d", addrstr, get_expiry (dns_server));
|
||||
_LOGD (" dns_server %s exp %s", addrstr,
|
||||
get_exp (str_exp, now_ns, dns_server));
|
||||
}
|
||||
for (i = 0; i < rdata->dns_domains->len; i++) {
|
||||
NMNDiscDNSDomain *dns_domain = &g_array_index (rdata->dns_domains, NMNDiscDNSDomain, i);
|
||||
|
||||
_LOGD (" dns_domain %s exp %d", dns_domain->domain, get_expiry (dns_domain));
|
||||
_LOGD (" dns_domain %s exp %s", dns_domain->domain,
|
||||
get_exp (str_exp, now_ns, dns_domain));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -304,7 +304,7 @@ activate:
|
|||
&local_error)) {
|
||||
_LOGW ("rollback: reactivation of connection %s/%s failed: %s",
|
||||
nm_connection_get_id ((NMConnection *) connection),
|
||||
nm_connection_get_uuid ((NMConnection * ) connection),
|
||||
nm_connection_get_uuid ((NMConnection *) connection),
|
||||
local_error->message);
|
||||
g_clear_error (&local_error);
|
||||
result = NM_ROLLBACK_RESULT_ERR_FAILED;
|
||||
|
|
|
|||
|
|
@ -3909,22 +3909,22 @@ nm_utils_lifetime_get (guint32 timestamp,
|
|||
* NM_PLATFORM_LIFETIME_PERMANENT). The real lifetime==0 addresses (E.g. DHCP6 telling us
|
||||
* to drop an address will have timestamp set.
|
||||
*/
|
||||
*out_lifetime = NM_PLATFORM_LIFETIME_PERMANENT;
|
||||
*out_preferred = NM_PLATFORM_LIFETIME_PERMANENT;
|
||||
NM_SET_OUT (out_lifetime, NM_PLATFORM_LIFETIME_PERMANENT);
|
||||
NM_SET_OUT (out_preferred, NM_PLATFORM_LIFETIME_PERMANENT);
|
||||
g_return_val_if_fail (preferred == 0, TRUE);
|
||||
} else {
|
||||
if (now <= 0)
|
||||
now = nm_utils_get_monotonic_timestamp_s ();
|
||||
t_lifetime = nm_utils_lifetime_rebase_relative_time_on_now (timestamp, lifetime, now);
|
||||
if (!t_lifetime) {
|
||||
*out_lifetime = 0;
|
||||
*out_preferred = 0;
|
||||
NM_SET_OUT (out_lifetime, 0);
|
||||
NM_SET_OUT (out_preferred, 0);
|
||||
return FALSE;
|
||||
}
|
||||
t_preferred = nm_utils_lifetime_rebase_relative_time_on_now (timestamp, preferred, now);
|
||||
|
||||
*out_lifetime = t_lifetime;
|
||||
*out_preferred = MIN (t_preferred, t_lifetime);
|
||||
NM_SET_OUT (out_lifetime, t_lifetime);
|
||||
NM_SET_OUT (out_preferred, MIN (t_preferred, t_lifetime));
|
||||
|
||||
/* Assert that non-permanent addresses have a (positive) @timestamp. nm_utils_lifetime_rebase_relative_time_on_now()
|
||||
* treats addresses with timestamp 0 as *now*. Addresses passed to _address_get_lifetime() always
|
||||
|
|
|
|||
|
|
@ -268,19 +268,19 @@ _addresses_sort_cmp (const NMPlatformIP6Address *a1,
|
|||
if (p1 != p2)
|
||||
return p1 > p2 ? -1 : 1;
|
||||
|
||||
ipv6_privacy1 = !!(a1->n_ifa_flags & (IFA_F_MANAGETEMPADDR | IFA_F_TEMPORARY));
|
||||
ipv6_privacy2 = !!(a2->n_ifa_flags & (IFA_F_MANAGETEMPADDR | IFA_F_TEMPORARY));
|
||||
ipv6_privacy1 = !!(a1->n_ifa_flags & (IFA_F_MANAGETEMPADDR | IFA_F_SECONDARY));
|
||||
ipv6_privacy2 = !!(a2->n_ifa_flags & (IFA_F_MANAGETEMPADDR | IFA_F_SECONDARY));
|
||||
if (ipv6_privacy1 || ipv6_privacy2) {
|
||||
gboolean public1 = TRUE, public2 = TRUE;
|
||||
|
||||
if (ipv6_privacy1) {
|
||||
if (a1->n_ifa_flags & IFA_F_TEMPORARY)
|
||||
if (a1->n_ifa_flags & IFA_F_SECONDARY)
|
||||
public1 = prefer_temp;
|
||||
else
|
||||
public1 = !prefer_temp;
|
||||
}
|
||||
if (ipv6_privacy2) {
|
||||
if (a2->n_ifa_flags & IFA_F_TEMPORARY)
|
||||
if (a2->n_ifa_flags & IFA_F_SECONDARY)
|
||||
public2 = prefer_temp;
|
||||
else
|
||||
public2 = !prefer_temp;
|
||||
|
|
|
|||
|
|
@ -768,6 +768,9 @@ nm_log_handler (const gchar *log_domain,
|
|||
break;
|
||||
}
|
||||
|
||||
if (global.debug_stderr)
|
||||
g_printerr ("%s%s\n", global.prefix, message ?: "");
|
||||
|
||||
switch (global.log_backend) {
|
||||
#if SYSTEMD_JOURNAL
|
||||
case LOG_BACKEND_JOURNAL:
|
||||
|
|
|
|||
|
|
@ -3124,13 +3124,15 @@ array_ip6_address_position (const GPtrArray *addresses,
|
|||
for (i = 0, pos = 0; i < len; i++) {
|
||||
NMPlatformIP6Address *candidate = NMP_OBJECT_CAST_IP6_ADDRESS (addresses->pdata[i]);
|
||||
|
||||
if (IN6_ARE_ADDR_EQUAL (&candidate->address, &address->address) && candidate->plen == address->plen) {
|
||||
guint32 lifetime, preferred;
|
||||
|
||||
if (nm_utils_lifetime_get (candidate->timestamp, candidate->lifetime, candidate->preferred,
|
||||
now, &lifetime, &preferred))
|
||||
return pos;
|
||||
}
|
||||
if ( IN6_ARE_ADDR_EQUAL (&candidate->address, &address->address)
|
||||
&& candidate->plen == address->plen
|
||||
&& nm_utils_lifetime_get (candidate->timestamp,
|
||||
candidate->lifetime,
|
||||
candidate->preferred,
|
||||
now,
|
||||
NULL,
|
||||
NULL))
|
||||
return pos;
|
||||
|
||||
if (!ignore_ll || !IN6_IS_ADDR_LINKLOCAL (&candidate->address))
|
||||
pos++;
|
||||
|
|
@ -3331,7 +3333,7 @@ nm_platform_ip4_address_sync (NMPlatform *self,
|
|||
known_address = NMP_OBJECT_CAST_IP4_ADDRESS (known_addresses->pdata[i]);
|
||||
|
||||
if (!nm_utils_lifetime_get (known_address->timestamp, known_address->lifetime, known_address->preferred,
|
||||
now, &lifetime, &preferred))
|
||||
now, NULL, NULL))
|
||||
goto delete_and_next;
|
||||
|
||||
if (G_UNLIKELY (!known_addresses_idx)) {
|
||||
|
|
@ -3556,7 +3558,7 @@ nm_platform_ip6_address_sync (NMPlatform *self,
|
|||
const NMPlatformIP6Address *known_address = NMP_OBJECT_CAST_IP6_ADDRESS (known_addresses->pdata[i]);
|
||||
guint32 lifetime, preferred;
|
||||
|
||||
if (NM_FLAGS_HAS (known_address->n_ifa_flags, IFA_F_TEMPORARY)) {
|
||||
if (NM_FLAGS_HAS (known_address->n_ifa_flags, IFA_F_SECONDARY)) {
|
||||
/* Kernel manages these */
|
||||
continue;
|
||||
}
|
||||
|
|
@ -5083,10 +5085,10 @@ NM_UTILS_FLAGS2STR_DEFINE (nm_platform_addr_flags2str, unsigned,
|
|||
NM_UTILS_FLAGS2STR (IFA_F_OPTIMISTIC, "optimistic"),
|
||||
NM_UTILS_FLAGS2STR (IFA_F_HOMEADDRESS, "homeaddress"),
|
||||
NM_UTILS_FLAGS2STR (IFA_F_DEPRECATED, "deprecated"),
|
||||
NM_UTILS_FLAGS2STR (IFA_F_TENTATIVE, "tentative"),
|
||||
NM_UTILS_FLAGS2STR (IFA_F_PERMANENT, "permanent"),
|
||||
NM_UTILS_FLAGS2STR (IFA_F_MANAGETEMPADDR, "mngtmpaddr"),
|
||||
NM_UTILS_FLAGS2STR (IFA_F_NOPREFIXROUTE, "noprefixroute"),
|
||||
NM_UTILS_FLAGS2STR (IFA_F_TENTATIVE, "tentative"),
|
||||
);
|
||||
|
||||
NM_UTILS_ENUM2STR_DEFINE (nm_platform_route_scope2str, int,
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ struct nl80211_bss_info {
|
|||
gboolean valid;
|
||||
};
|
||||
|
||||
#define WLAN_EID_SSID 0
|
||||
#define WLAN_EID_SSID 0
|
||||
|
||||
static void
|
||||
find_ssid (guint8 *ies, guint32 ies_len,
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ nm_secret_agent_add_permission (NMSecretAgent *agent,
|
|||
* @permission: The name of the permission to check for
|
||||
*
|
||||
* Returns whether or not the agent has the given permission.
|
||||
*
|
||||
*
|
||||
* Returns: %TRUE if the agent has the given permission, %FALSE if it does not
|
||||
* or if the permission was not previous recorded with
|
||||
* nm_secret_agent_add_permission().
|
||||
|
|
|
|||
|
|
@ -1505,7 +1505,7 @@ check_writable (NMConnection *self, GError **error)
|
|||
}
|
||||
|
||||
static void
|
||||
get_settings_auth_cb (NMSettingsConnection *self,
|
||||
get_settings_auth_cb (NMSettingsConnection *self,
|
||||
GDBusMethodInvocation *context,
|
||||
NMAuthSubject *subject,
|
||||
GError *error,
|
||||
|
|
|
|||
|
|
@ -129,8 +129,8 @@ _recursive_ifparser (const char *eni_file, int quiet)
|
|||
|
||||
while (!feof(inp))
|
||||
{
|
||||
char *token[128]; /* 255 chars can only be split into 127 tokens */
|
||||
char value[255]; /* large enough to join previously split tokens */
|
||||
char *token[128]; /* 255 chars can only be split into 127 tokens */
|
||||
char value[255]; /* large enough to join previously split tokens */
|
||||
char *safeptr;
|
||||
int toknum;
|
||||
int len = 0;
|
||||
|
|
@ -169,7 +169,7 @@ _recursive_ifparser (const char *eni_file, int quiet)
|
|||
continue;
|
||||
}
|
||||
|
||||
#define SPACES " \t"
|
||||
#define SPACES " \t"
|
||||
/* tokenize input; */
|
||||
for (toknum = 0, token[toknum] = strtok_r(line, SPACES, &safeptr);
|
||||
token[toknum] != NULL;
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ dump_blocks (void)
|
|||
for (n = ifparser_getfirst (); n != NULL; n = n->next) {
|
||||
if_data *m;
|
||||
|
||||
// each block start with its type & name
|
||||
// each block start with its type & name
|
||||
// (single quotes used to show typ & name baoundaries)
|
||||
g_print("'%s' '%s'\n", n->type, n->name);
|
||||
|
||||
|
|
|
|||
|
|
@ -222,10 +222,10 @@ validate_type_keyword (const struct Opt * opt,
|
|||
const char * value,
|
||||
const guint32 len)
|
||||
{
|
||||
char ** allowed;
|
||||
gchar ** candidates = NULL;
|
||||
char ** candidate;
|
||||
gboolean found = FALSE;
|
||||
char **allowed;
|
||||
gchar **candidates = NULL;
|
||||
char **candidate;
|
||||
gboolean found = FALSE;
|
||||
|
||||
g_return_val_if_fail (opt != NULL, FALSE);
|
||||
g_return_val_if_fail (value != NULL, FALSE);
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@
|
|||
#ifndef __NETWORKMANAGER_SUPPLICANT_TYPES_H__
|
||||
#define __NETWORKMANAGER_SUPPLICANT_TYPES_H__
|
||||
|
||||
#define WPAS_DBUS_SERVICE "fi.w1.wpa_supplicant1"
|
||||
#define WPAS_DBUS_PATH "/fi/w1/wpa_supplicant1"
|
||||
#define WPAS_DBUS_INTERFACE "fi.w1.wpa_supplicant1"
|
||||
#define WPAS_DBUS_SERVICE "fi.w1.wpa_supplicant1"
|
||||
#define WPAS_DBUS_PATH "/fi/w1/wpa_supplicant1"
|
||||
#define WPAS_DBUS_INTERFACE "fi.w1.wpa_supplicant1"
|
||||
|
||||
typedef struct _NMSupplicantManager NMSupplicantManager;
|
||||
typedef struct _NMSupplicantInterface NMSupplicantInterface;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue