[PATCH 7/7] auth: Remove 'WaitingForOK' from client

Thomas Zimmermann tdz at users.sourceforge.net
Tue Aug 9 19:18:32 UTC 2016


This patch removes the code for the client's 'WaitingForOK' state, which
is currently unused. A future patch set should probably implement a more
strict validation of the protocol states.

Signed-off-by: Thomas Zimmermann <tdz at users.sourceforge.net>
---
 dbus/dbus-auth.c | 34 ----------------------------------
 1 file changed, 34 deletions(-)

diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c
index acc259e..1588050 100644
--- a/dbus/dbus-auth.c
+++ b/dbus/dbus-auth.c
@@ -266,9 +266,6 @@ static const DBusAuthStateData server_state_waiting_for_begin = {
 static dbus_bool_t handle_client_state_waiting_for_data   (DBusAuth         *auth,
                                                            DBusAuthCommand   command,
                                                            const DBusString *args);
-static dbus_bool_t handle_client_state_waiting_for_ok     (DBusAuth         *auth,
-                                                           DBusAuthCommand   command,
-                                                           const DBusString *args);
 static dbus_bool_t handle_client_state_waiting_for_reject (DBusAuth         *auth,
                                                            DBusAuthCommand   command,
                                                            const DBusString *args);
@@ -282,9 +279,6 @@ static const DBusAuthStateData client_state_need_send_auth = {
 static const DBusAuthStateData client_state_waiting_for_data = {
   "WaitingForData", handle_client_state_waiting_for_data
 };
-static const DBusAuthStateData client_state_waiting_for_ok = {
-  "WaitingForOK", handle_client_state_waiting_for_ok
-};
 static const DBusAuthStateData client_state_waiting_for_reject = {
   "WaitingForReject", handle_client_state_waiting_for_reject
 };
@@ -2036,34 +2030,6 @@ handle_client_state_waiting_for_data (DBusAuth         *auth,
 }
 
 static dbus_bool_t
-handle_client_state_waiting_for_ok (DBusAuth         *auth,
-                                    DBusAuthCommand   command,
-                                    const DBusString *args)
-{
-  switch (command)
-    {
-    case DBUS_AUTH_COMMAND_REJECTED:
-      return process_rejected (auth, args);
-
-    case DBUS_AUTH_COMMAND_OK:
-      return process_ok(auth, args);
-
-    case DBUS_AUTH_COMMAND_DATA:
-    case DBUS_AUTH_COMMAND_ERROR:
-      return send_cancel (auth);
-
-    case DBUS_AUTH_COMMAND_AUTH:
-    case DBUS_AUTH_COMMAND_CANCEL:
-    case DBUS_AUTH_COMMAND_BEGIN:
-    case DBUS_AUTH_COMMAND_UNKNOWN:
-    case DBUS_AUTH_COMMAND_NEGOTIATE_UNIX_FD:
-    case DBUS_AUTH_COMMAND_AGREE_UNIX_FD:
-    default:
-      return send_error (auth, "Unknown command");
-    }
-}
-
-static dbus_bool_t
 handle_client_state_waiting_for_reject (DBusAuth         *auth,
                                         DBusAuthCommand   command,
                                         const DBusString *args)
-- 
2.7.4



More information about the dbus mailing list