libnm-glib: ensure invalids secrets hash isn't used on error condition

Apparently dbus-glib just sends through a random address for the
hash table even if 'error' is set.  Make sure we don't pass that down
to subclasses.
This commit is contained in:
Dan Williams
2010-07-21 15:37:53 -07:00
parent 1ba6dcacbf
commit fe869a35e6

View File

@@ -164,7 +164,7 @@ get_secrets_cb (DBusGProxy *proxy, GHashTable *secrets, GError *error, gpointer
RemoteCall *call = user_data; RemoteCall *call = user_data;
NMSettingsConnectionInterfaceGetSecretsFunc func = (NMSettingsConnectionInterfaceGetSecretsFunc) call->callback; NMSettingsConnectionInterfaceGetSecretsFunc func = (NMSettingsConnectionInterfaceGetSecretsFunc) call->callback;
(*func)(NM_SETTINGS_CONNECTION_INTERFACE (call->self), secrets, error, call->user_data); (*func)(NM_SETTINGS_CONNECTION_INTERFACE (call->self), error ? NULL : secrets, error, call->user_data);
remote_call_complete (call->self, call); remote_call_complete (call->self, call);
} }