dbus.c: Fix handling of DBUS_TYPE_BYTE
From the DBus docs of DBUS_TYPE_BYTE: Type code marking an 8-bit unsigned integer. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
ab408103ee
commit
9a030ba299
2
dbus.c
2
dbus.c
|
@ -325,7 +325,6 @@ a_dbus_convert_value(lua_State *L, int idx, DBusMessageIter *iter)
|
||||||
} \
|
} \
|
||||||
break;
|
break;
|
||||||
DBUS_MSG_RETURN_HANDLE_TYPE_STRING(DBUS_TYPE_STRING)
|
DBUS_MSG_RETURN_HANDLE_TYPE_STRING(DBUS_TYPE_STRING)
|
||||||
DBUS_MSG_RETURN_HANDLE_TYPE_STRING(DBUS_TYPE_BYTE)
|
|
||||||
#undef DBUS_MSG_RETURN_HANDLE_TYPE_STRING
|
#undef DBUS_MSG_RETURN_HANDLE_TYPE_STRING
|
||||||
#define DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(type, dbustype) \
|
#define DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(type, dbustype) \
|
||||||
case dbustype: \
|
case dbustype: \
|
||||||
|
@ -334,6 +333,7 @@ a_dbus_convert_value(lua_State *L, int idx, DBusMessageIter *iter)
|
||||||
dbus_message_iter_append_basic(iter, dbustype, &num); \
|
dbus_message_iter_append_basic(iter, dbustype, &num); \
|
||||||
} \
|
} \
|
||||||
break;
|
break;
|
||||||
|
DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(uint8_t, DBUS_TYPE_BYTE)
|
||||||
DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(int16_t, DBUS_TYPE_INT16)
|
DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(int16_t, DBUS_TYPE_INT16)
|
||||||
DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(uint16_t, DBUS_TYPE_UINT16)
|
DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(uint16_t, DBUS_TYPE_UINT16)
|
||||||
DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(int32_t, DBUS_TYPE_INT32)
|
DBUS_MSG_RETURN_HANDLE_TYPE_NUMBER(int32_t, DBUS_TYPE_INT32)
|
||||||
|
|
Loading…
Reference in New Issue