Emit signal when command queue execution is halted because of error
This allows a client that waits for studio load/start to stop the wait. Using a timeout is still good idea because of potential bugs in ladishd.
This commit is contained in:
parent
e5a6e5906c
commit
28f54ff578
|
@ -684,6 +684,11 @@ void emit_studio_disappeared(void)
|
|||
dbus_signal_emit(g_dbus_connection, CONTROL_OBJECT_PATH, INTERFACE_NAME, "StudioDisappeared", "");
|
||||
}
|
||||
|
||||
void emit_queue_execution_halted(void)
|
||||
{
|
||||
dbus_signal_emit(g_dbus_connection, CONTROL_OBJECT_PATH, INTERFACE_NAME, "QueueExecutionHalted", "");
|
||||
}
|
||||
|
||||
void emit_clean_exit(void)
|
||||
{
|
||||
dbus_signal_emit(g_dbus_connection, CONTROL_OBJECT_PATH, INTERFACE_NAME, "CleanExit", "");
|
||||
|
@ -748,12 +753,16 @@ SIGNAL_ARGS_END
|
|||
SIGNAL_ARGS_BEGIN(StudioDisappeared, "Studio D-Bus object disappeared")
|
||||
SIGNAL_ARGS_END
|
||||
|
||||
SIGNAL_ARGS_BEGIN(QueueExecutionHalted, "Queue execution is halted because of error")
|
||||
SIGNAL_ARGS_END
|
||||
|
||||
SIGNAL_ARGS_BEGIN(CleanExit, "Exit was requested")
|
||||
SIGNAL_ARGS_END
|
||||
|
||||
SIGNALS_BEGIN
|
||||
SIGNAL_DESCRIBE(StudioAppeared)
|
||||
SIGNAL_DESCRIBE(StudioDisappeared)
|
||||
SIGNAL_DESCRIBE(QueueExecutionHalted)
|
||||
SIGNAL_DESCRIBE(CleanExit)
|
||||
SIGNALS_END
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ extern const struct dbus_interface_descriptor g_lashd_interface_control;
|
|||
|
||||
void emit_studio_appeared(void);
|
||||
void emit_studio_disappeared(void);
|
||||
void emit_queue_execution_halted(void);
|
||||
void emit_clean_exit(void);
|
||||
|
||||
bool room_templates_init(void);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* LADI Session Handler (ladish)
|
||||
*
|
||||
* Copyright (C) 2009 Nedko Arnaudov <nedko@arnaudov.name>
|
||||
* Copyright (C) 2009, 2010 Nedko Arnaudov <nedko@arnaudov.name>
|
||||
*
|
||||
**************************************************************************
|
||||
* This file contains interface to the command queue
|
||||
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include "cmd.h"
|
||||
#include "control.h"
|
||||
|
||||
void ladish_cqueue_init(struct ladish_cqueue * queue_ptr)
|
||||
{
|
||||
|
@ -57,6 +58,7 @@ loop:
|
|||
if (!cmd_ptr->run(cmd_ptr->context))
|
||||
{
|
||||
ladish_cqueue_clear(queue_ptr);
|
||||
emit_queue_execution_halted();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -70,6 +72,7 @@ loop:
|
|||
log_error("unexpected cmd state %u after run()", cmd_ptr->state);
|
||||
ASSERT_NO_PASS;
|
||||
ladish_cqueue_clear(queue_ptr);
|
||||
emit_queue_execution_halted();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue