#include "connection.h"
#include "auth-client-interface.h"
#include "master-interface.h"
+#include "master-service.h"
#include "auth-client-private.h"
#include "auth-master.h"
return 0;
}
+static void auth_master_stop(struct auth_master_connection *conn)
+{
+ if (master_service_is_killed(master_service)) {
+ auth_request_lookup_abort(conn);
+ io_loop_stop(conn->ioloop);
+ }
+}
+
static int auth_master_run_cmd(struct auth_master_connection *conn,
const char *cmd)
{
if (auth_master_run_cmd_pre(conn, cmd) < 0)
return -1;
+ /* add stop handler */
+ struct timeout *to = timeout_add_short(100, auth_master_stop, conn);
io_loop_run(conn->ioloop);
+ timeout_remove(&to);
return auth_master_run_cmd_post(conn);
}
#include "write-full.h"
#include "connection.h"
#include "master-interface.h"
+#include "master-service.h"
#include "test-common.h"
#include "test-subprocess.h"
#define TEST_SOCKET "./auth-master-test"
#define SERVER_KILL_TIMEOUT_SECS 20
+struct master_service *master_service = NULL;
+
static void main_deinit(void);
/*
/* nothing yet; also called from sub-processes */
}
+bool master_service_is_killed(struct master_service *service ATTR_UNUSED)
+{
+ return FALSE;
+}
+
int main(int argc, char *argv[])
{
int c;