Add annotation for asynchronous methods
libgdbus commit ID: 7fd09a4ca7a95027ff4b877e82049b6f913c1e78
This commit is contained in:
parent
cbcaa2da7d
commit
264d47f595
2 changed files with 6 additions and 0 deletions
|
@ -77,6 +77,7 @@ typedef dbus_bool_t (* GDBusPropertySetFunction) (DBusConnection *connection,
|
|||
typedef enum {
|
||||
G_DBUS_METHOD_FLAG_DEPRECATED = (1 << 0),
|
||||
G_DBUS_METHOD_FLAG_NOREPLY = (1 << 1),
|
||||
G_DBUS_METHOD_FLAG_ASYNC = (1 << 2),
|
||||
} GDBusMethodFlags;
|
||||
|
||||
/** Signal flags */
|
||||
|
|
|
@ -604,6 +604,11 @@ static DBusHandlerResult handle_message(DBusConnection *connection,
|
|||
return DBUS_HANDLER_RESULT_HANDLED;
|
||||
}
|
||||
|
||||
if (method->flags & G_DBUS_METHOD_FLAG_ASYNC) {
|
||||
if (reply == NULL)
|
||||
return DBUS_HANDLER_RESULT_HANDLED;
|
||||
}
|
||||
|
||||
if (reply == NULL)
|
||||
return DBUS_HANDLER_RESULT_NEED_MEMORY;
|
||||
|
||||
|
|
Loading…
Reference in a new issue