On Fri, Sep 04, 2015 at 10:03:27AM +0300, Patrik Flykt wrote:
> On Thu, 2015-09-03 at 16:50 +0200, Marcus Folkesson wrote:
> > Just saw a patch from jhannika posted on the channel:
> > jgke.fi/dump/typecheck.patch
> >
> > It practically to the same thing.
>
> Probably, but if it's not on this ml, it does not exist ;-). As a
> coincidence, me and jhannika actually discussed this yesterday.
>
> Cheers,
>
> Patrik
>
> _______________________________________________
> connman mailing list
> [email protected]
> https://lists.connman.net/mailman/listinfo/connman
Yeah, I wrote about the bug on the channel for two days ago.
Is it worth to go through all calls to dbus_message_iter_basic() and do
type-checking?
Maybe wrap it into a function that we use everywhere so we have a generic way
to do it
E.g.
bool get_basic_type(DBusMessageIter *iter, void *value, int expected_type)
{
int type = dbus_message_iter_get_arg_type(entry);
if (type != expected_type)
return false;
dbus_message_iter_basic(iter, value);
return true;
}
Cheers,
Marcus Folkesson
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman