]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-auth-client: auth_client_request_handle_input() - Coalesce duplicated switch...
authorMarco Bettini <marco.bettini@open-xchange.com>
Wed, 11 Jun 2025 14:40:14 +0000 (14:40 +0000)
committerMarco Bettini <marco.bettini@open-xchange.com>
Fri, 27 Jun 2025 13:54:52 +0000 (13:54 +0000)
src/lib-auth-client/auth-client-request.c

index 625dca46427b7eb0e06a853d2b8aae94f69b7d2f..7c5b8643505f0857e66d439188b966080a766e28 100644 (file)
@@ -453,14 +453,18 @@ auth_client_request_handle_input(struct auth_client_request **_request,
        case AUTH_REQUEST_STATUS_CONTINUE:
                e = event_create_passthrough(request->event)->
                        set_name("auth_client_request_challenged");
+
+               for (tmp = args; tmp != NULL && *tmp != NULL; tmp++) {
+                       if (str_begins(*tmp, "channel_binding=",
+                                      &cbinding_type))
+                               break;
+               }
+               args = NULL;
                break;
        default:
                e = event_create_passthrough(request->event)->
                        set_name("auth_client_request_finished");
-               break;
-       }
 
-       if (status != AUTH_REQUEST_STATUS_CONTINUE) {
                for (tmp = args; tmp != NULL && *tmp != NULL; tmp++) {
                        const char *key;
                        const char *value;
@@ -470,13 +474,7 @@ auth_client_request_handle_input(struct auth_client_request **_request,
                        else
                                args_parse_user(request, key, value);
                }
-       } else {
-               for (tmp = args; tmp != NULL && *tmp != NULL; tmp++) {
-                       if (str_begins(*tmp, "channel_binding=",
-                                      &cbinding_type))
-                               break;
-               }
-               args = NULL;
+               break;
        }
 
        if (cbinding_type != NULL) {