libnm: merge branch 'th/nmclient-fix'
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=982613 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/662
This commit is contained in:
@@ -2930,11 +2930,15 @@ _dbus_handle_properties_changed(NMClient * self,
|
|||||||
gs_free char *ss = NULL;
|
gs_free char *ss = NULL;
|
||||||
|
|
||||||
NML_NMCLIENT_LOG_T(self,
|
NML_NMCLIENT_LOG_T(self,
|
||||||
"[%s]: %s: properties changed for interface %s { %s }",
|
"[%s]: %s: properties changed for interface %s %s%s%s",
|
||||||
object_path,
|
object_path,
|
||||||
log_context,
|
log_context,
|
||||||
interface_name,
|
interface_name,
|
||||||
(ss = g_variant_print(changed_properties, TRUE)));
|
NM_PRINT_FMT_QUOTED(changed_properties,
|
||||||
|
"{ ",
|
||||||
|
(ss = g_variant_print(changed_properties, TRUE)),
|
||||||
|
" }",
|
||||||
|
"(no changed properties)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inout_dbobj) {
|
if (inout_dbobj) {
|
||||||
@@ -2946,9 +2950,12 @@ _dbus_handle_properties_changed(NMClient * self,
|
|||||||
dbobj = _dbobjs_dbobj_get_r(self, dbus_path);
|
dbobj = _dbobjs_dbobj_get_r(self, dbus_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dbobj)
|
if (dbobj) {
|
||||||
|
nm_assert(dbobj->obj_state >= NML_DBUS_OBJ_STATE_WATCHED_ONLY);
|
||||||
db_iface_data = nml_dbus_object_iface_data_get(dbobj, interface_name, allow_add_iface);
|
db_iface_data = nml_dbus_object_iface_data_get(dbobj, interface_name, allow_add_iface);
|
||||||
else if (allow_add_iface) {
|
if (db_iface_data && dbobj->obj_state == NML_DBUS_OBJ_STATE_WATCHED_ONLY)
|
||||||
|
nml_dbus_object_set_obj_state(dbobj, NML_DBUS_OBJ_STATE_ON_DBUS, self);
|
||||||
|
} else if (allow_add_iface) {
|
||||||
dbobj = _dbobjs_dbobj_create(self, g_steal_pointer(&dbus_path));
|
dbobj = _dbobjs_dbobj_create(self, g_steal_pointer(&dbus_path));
|
||||||
nml_dbus_object_set_obj_state(dbobj, NML_DBUS_OBJ_STATE_ON_DBUS, self);
|
nml_dbus_object_set_obj_state(dbobj, NML_DBUS_OBJ_STATE_ON_DBUS, self);
|
||||||
db_iface_data = nml_dbus_object_iface_data_get(dbobj, interface_name, TRUE);
|
db_iface_data = nml_dbus_object_iface_data_get(dbobj, interface_name, TRUE);
|
||||||
|
@@ -46,6 +46,7 @@ _nml_dbus_log(NMLDBusLogLevel level, gboolean use_stdout, const char *fmt, ...)
|
|||||||
va_list args;
|
va_list args;
|
||||||
const char * prefix = "";
|
const char * prefix = "";
|
||||||
gint64 ts;
|
gint64 ts;
|
||||||
|
pid_t pid;
|
||||||
|
|
||||||
/* we only call _nml_dbus_log() after nml_dbus_log_enabled(), which already does
|
/* we only call _nml_dbus_log() after nml_dbus_log_enabled(), which already does
|
||||||
* an atomic access to the variable. Since the value is only initialized once and
|
* an atomic access to the variable. Since the value is only initialized once and
|
||||||
@@ -89,14 +90,18 @@ _nml_dbus_log(NMLDBusLogLevel level, gboolean use_stdout, const char *fmt, ...)
|
|||||||
|
|
||||||
ts = nm_utils_clock_gettime_nsec(CLOCK_BOOTTIME);
|
ts = nm_utils_clock_gettime_nsec(CLOCK_BOOTTIME);
|
||||||
|
|
||||||
|
pid = getpid();
|
||||||
|
|
||||||
if (use_stdout) {
|
if (use_stdout) {
|
||||||
g_print("libnm-dbus: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n",
|
g_print("libnm-dbus[%lld]: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n",
|
||||||
|
(long long) pid,
|
||||||
prefix,
|
prefix,
|
||||||
ts / NM_UTILS_NSEC_PER_SEC,
|
ts / NM_UTILS_NSEC_PER_SEC,
|
||||||
(ts / (NM_UTILS_NSEC_PER_SEC / 10000)) % 10000,
|
(ts / (NM_UTILS_NSEC_PER_SEC / 10000)) % 10000,
|
||||||
msg);
|
msg);
|
||||||
} else {
|
} else {
|
||||||
g_printerr("libnm-dbus: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n",
|
g_printerr("libnm-dbus[%lld]: %s[%" G_GINT64_FORMAT ".%05" G_GINT64_FORMAT "] %s\n",
|
||||||
|
(long long) pid,
|
||||||
prefix,
|
prefix,
|
||||||
ts / NM_UTILS_NSEC_PER_SEC,
|
ts / NM_UTILS_NSEC_PER_SEC,
|
||||||
(ts / (NM_UTILS_NSEC_PER_SEC / 10000)) % 10000,
|
(ts / (NM_UTILS_NSEC_PER_SEC / 10000)) % 10000,
|
||||||
|
Reference in New Issue
Block a user