return explicit dbus void replies
This commit is contained in:
parent
e8a278820d
commit
13adaabad4
9
dbus.c
9
dbus.c
|
@ -126,6 +126,15 @@ fail_no_mem:
|
|||
a2j_error("Ran out of memory trying to construct method return");
|
||||
}
|
||||
|
||||
void a2j_dbus_construct_method_return_void(struct a2j_dbus_method_call * call_ptr)
|
||||
{
|
||||
call_ptr->reply = dbus_message_new_method_return(call_ptr->message);
|
||||
if (call_ptr->reply == NULL)
|
||||
{
|
||||
a2j_error("Ran out of memory trying to construct method return");
|
||||
}
|
||||
}
|
||||
|
||||
#define descriptor_ptr ((struct a2j_dbus_object_descriptor *)data)
|
||||
|
||||
DBusHandlerResult
|
||||
|
|
|
@ -53,6 +53,7 @@ a2j_dbus_exit(
|
|||
struct a2j_dbus_method_call * call_ptr)
|
||||
{
|
||||
g_keep_walking = false;
|
||||
a2j_dbus_construct_method_return_void(call_ptr);
|
||||
}
|
||||
|
||||
static void a2j_dbus_set_hw_export(struct a2j_dbus_method_call * call_ptr)
|
||||
|
@ -82,6 +83,8 @@ static void a2j_dbus_set_hw_export(struct a2j_dbus_method_call * call_ptr)
|
|||
g_a2j_export_hw_ports = hw_export;
|
||||
|
||||
a2j_info("Hardware ports %s be exported.", g_a2j_export_hw_ports ? "will": "will not");
|
||||
|
||||
a2j_dbus_construct_method_return_void(call_ptr);
|
||||
}
|
||||
|
||||
static
|
||||
|
@ -93,6 +96,10 @@ a2j_dbus_start(
|
|||
{
|
||||
a2j_dbus_error(call_ptr, A2J_DBUS_ERROR_GENERIC, "a2j_start() failed.");
|
||||
}
|
||||
else
|
||||
{
|
||||
a2j_dbus_construct_method_return_void(call_ptr);
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
|
@ -104,6 +111,10 @@ a2j_dbus_stop(
|
|||
{
|
||||
a2j_dbus_error(call_ptr, A2J_DBUS_ERROR_GENERIC, "a2j_stop() failed.");
|
||||
}
|
||||
else
|
||||
{
|
||||
a2j_dbus_construct_method_return_void(call_ptr);
|
||||
}
|
||||
}
|
||||
|
||||
static
|
||||
|
|
|
@ -194,6 +194,8 @@ a2j_dbus_construct_method_return_single(
|
|||
int type,
|
||||
void * arg_ptr);
|
||||
|
||||
void a2j_dbus_construct_method_return_void(struct a2j_dbus_method_call * call_ptr);
|
||||
|
||||
void
|
||||
a2j_dbus_signal(
|
||||
const char * path,
|
||||
|
|
Loading…
Reference in New Issue