]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
D-Bus: Remove the obsolete notes from wpas_dbus_error_unknown_error()
authorJouni Malinen <j@w1.fi>
Thu, 1 Jan 2015 20:16:34 +0000 (22:16 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 2 Jan 2015 20:50:27 +0000 (22:50 +0200)
Commit 6aeeb6fa21bc072ba92ce9423ba5c0417e8c0bf5 ('dbus: clean up new
D-Bus interface getters and setters') redesigned the property
getter/setter calls in a way that made the
wpas_dbus_error_unknown_error() note about message being NULL in some
cases obsolete. All the remaining callers are from method handler
functions that must have a valid message. Remove the obsolete notes and
unnecessary messsage == NULL check.

Signed-off-by: Jouni Malinen <j@w1.fi>
wpa_supplicant/dbus/dbus_new_handlers.c

index bdaddb67931a4eb2d4b9bb84cdcce4f15d98c027..c2fabdf2c2b100bb936bd1801c69fd0176e4375e 100644 (file)
@@ -35,7 +35,7 @@ static const char * const debug_strings[] = {
 
 
 /**
- * wpas_dbus_error_unknown_error - Return a new InvalidArgs error message
+ * wpas_dbus_error_unknown_error - Return a new UnknownError error message
  * @message: Pointer to incoming dbus message this error refers to
  * @arg: Optional string appended to error message
  * Returns: a dbus error message
@@ -45,20 +45,6 @@ static const char * const debug_strings[] = {
 DBusMessage * wpas_dbus_error_unknown_error(DBusMessage *message,
                                            const char *arg)
 {
-       /*
-        * This function can be called as a result of a failure
-        * within internal getter calls, which will call this function
-        * with a NULL message parameter.  However, dbus_message_new_error
-        * looks very unkindly (i.e, abort()) on a NULL message, so
-        * in this case, we should not call it.
-        */
-       if (message == NULL) {
-               wpa_printf(MSG_INFO,
-                          "dbus: %s called with NULL message (arg=%s)",
-                          __func__, arg ? arg : "N/A");
-               return NULL;
-       }
-
        return dbus_message_new_error(message, WPAS_DBUS_ERROR_UNKNOWN_ERROR,
                                      arg);
 }