summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
95f7a65)
Boolean properties have an encoded length of zero, but we were failing
spuriously due to an excessively broad error check. Other than that, we
have already done all the necessary decoding for boolean properties, so
just wire up the appropriate GObject calls to make it happen.
}
rc = decode_tag_size(&head->size, tag_size, buf+len, n-len);
}
rc = decode_tag_size(&head->size, tag_size, buf+len, n-len);
+ if (rc == 0 && head->size == 0)
g_value_set_ulong(&val, unpack_32_le(priv->buf+len));
g_object_set_property(G_OBJECT(uo), head->prop_name, &val);
break;
g_value_set_ulong(&val, unpack_32_le(priv->buf+len));
g_object_set_property(G_OBJECT(uo), head->prop_name, &val);
break;
+ case PROPERTY_BOOLEAN:
+ g_value_init(&val, G_TYPE_BOOLEAN);
+ g_value_set_boolean(&val, head->tag_msb);
+ g_object_set_property(G_OBJECT(uo), head->prop_name, &val);
+ break;
case PROPERTY_OBJECT:
rc = decode_object_property(uo, &val, len);
if (rc != 0)
case PROPERTY_OBJECT:
rc = decode_object_property(uo, &val, len);
if (rc != 0)