advertising: parse_[min|max]_interval: reset value if iter is NULL
authorChristian Eggers <ceggers@arri.de>
Fri, 23 Sep 2022 14:57:31 +0000 (16:57 +0200)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:55 +0000 (14:55 +0530)
Set property to its default value (as done in all other methods listed
in parsers[]).

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/advertising.c

index f8664b4..a2ee13a 100644 (file)
@@ -1115,8 +1115,10 @@ static bool parse_max_interval(DBusMessageIter *iter,
        if (!(g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL))
                return true;
 
-       if (!iter)
+       if (!iter) {
+               client->max_interval = 0;
                return false;
+       }
 
        if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_UINT32)
                return false;