Merge pull request #587 from mgsloan/fix-notification-decode-error-handling

Fix handling of case where notification decode failure occurs
This commit is contained in:
Nikos Tsipinakis 2019-01-13 17:48:02 +02:00 committed by GitHub
commit c8c7d2e675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -299,10 +299,12 @@ static void dbus_cb_Notify(
{
struct notification *n = dbus_message_to_notification(sender, parameters);
if (!n) {
LOG_W("A notification failed to decode.");
g_dbus_method_invocation_return_dbus_error(
invocation,
"Cannot decode notification!",
"");
FDN_IFAC".Error",
"Cannot decode notification!");
return;
}
int id = queues_notification_insert(n);