{
const char *msg_type;
+ if (!iter)
+ return true;
+
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_STRING)
return false;
{
DBusMessageIter ariter;
+ if (!iter) {
+ bt_ad_clear_service_uuid(client->data);
+ return true;
+ }
+
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_ARRAY)
return false;
{
DBusMessageIter ariter;
+ if (!iter) {
+ bt_ad_clear_solicit_uuid(client->data);
+ return true;
+ }
+
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_ARRAY)
return false;
{
DBusMessageIter entries;
+ if (!iter) {
+ bt_ad_clear_manufacturer_data(client->data);
+ return true;
+ }
+
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_ARRAY)
return false;
{
DBusMessageIter entries;
+ if (!iter) {
+ bt_ad_clear_service_data(client->data);
+ return true;
+ }
+
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_ARRAY)
return false;
{
DBusMessageIter entries;
+ if (!iter) {
+ client->flags = 0;
+ return true;
+ }
+
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_ARRAY)
return false;
dbus_message_iter_recurse(iter, &entries);
+ /* Reset flags before parsing */
+ client->flags = 0;
+
while (dbus_message_iter_get_arg_type(&entries) == DBUS_TYPE_STRING) {
const char *str;
struct adv_include *inc;
{
const char *name;
+ if (!iter) {
+ free(client->name);
+ client->name = NULL;
+ return true;
+ }
+
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_STRING)
return false;
static bool parse_appearance(DBusMessageIter *iter,
struct btd_adv_client *client)
{
+ if (!iter) {
+ client->appearance = 0;
+ return true;
+ }
+
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_UINT16)
return false;
static bool parse_duration(DBusMessageIter *iter,
struct btd_adv_client *client)
{
+ if (!iter) {
+ client->duration = 0;
+ return true;
+ }
+
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_UINT16)
return false;
static bool parse_timeout(DBusMessageIter *iter,
struct btd_adv_client *client)
{
+ if (!iter) {
+ client->timeout = 0;
+ g_source_remove(client->to_id);
+ client->to_id = 0;
+ return true;
+ }
+
if (dbus_message_iter_get_arg_type(iter) != DBUS_TYPE_UINT16)
return false;