]> jfr.im git - solanum.git/blobdiff - authd/authd.c
authd: add abiltiy to cancel connection
[solanum.git] / authd / authd.c
index c6ed0911c7ce6f33edee21d05380c7a843d4bc20..6f500a9db3988ab9c08ee8633754a3ac250f0139 100644 (file)
@@ -32,7 +32,8 @@ static void handle_options(int parc, char *parv[]);
 rb_helper *authd_helper = NULL;
 authd_cmd_handler authd_cmd_handlers[256] = {
        ['C'] = handle_new_connection,
-       ['D'] = resolve_dns,
+       ['D'] = handle_resolve_dns,
+       ['E'] = handle_cancel_connection,
        ['O'] = handle_options,
        ['R'] = handle_reload,
        ['S'] = handle_stat,
@@ -88,7 +89,7 @@ handle_options(int parc, char *parv[])
                return;
        }
 
-       handler->handler(parv[1], parc - 2, (const char **)(parv + 3));
+       handler->handler(parv[1], parc - 2, (const char **)&parv[2]);
 }
 
 static void
@@ -202,5 +203,7 @@ main(int argc, char *argv[])
 
        rb_helper_loop(authd_helper, 0);
 
+       destroy_providers();
+
        return 0;
 }