Fix error code in case of invalid offset
PATCH 1/1 Fix error code in case of invalid offset
Fix dbus error code in case of invalid offset (org.bluez.Error.InvalidOffset).
Ryll, Jan (BSH) (1):
fix dbus error code in case of invalid offset
(org.bluez.Error.InvalidOffset)
client/gatt.c | 4 ++++ 1 file changed, 4 insertions(+)
Signature · 1 line
2.7.4
PATCH 1/1 fix dbus error code in case of invalid offset (org.bluez.Error.InvalidOffset)
From: "Ryll, Jan (BSH)" <[email protected]>
--- client/gatt.c | 4 ++++ 1 file changed, 4 insertions(+)
client/gatt.c +4 -0
@@ -2276,6 +2276,10 @@ static DBusMessage *chrc_write_value(DBusConnection *conn, DBusMessage *msg,if (prep_authorize)return g_dbus_create_reply (msg,DBUS_TYPE_INVALID ); +if (offset >= (chrc->max_val_len)) +return g_dbus_create_error (msg, +"org.bluez.Error.InvalidOffset" ,NULL ); +if (write_value (&chrc->value_len, &chrc->value, value, value_len, offset, chrc->max_val_len)) return g_dbus_create_error(msg,
Signature · 1 line
2.7.4
Luiz Augusto von Dentz
maintainerRe: [PATCH BlueZ] fix dbus error code in case of invalid offset (org.bluez.Error.InvalidOffset)
Hi Thorsten,
You may want to fix the commit message to state that this is for the client, e.g.
client: Fix not sending InvalidOffset
...<some description why it is needed>
Quoted 25 lines · Thorsten (BSH)
From: "Ryll, Jan (BSH)" <[email protected]>
--- client/gatt.c | 4 ++++ 1 file changed, 4 insertions(+)client/gatt.c +4
-1@@ -2276,6 +2276,10 @@ static DBusMessage *chrc_write_value(DBusConnection *conn, DBusMessage *msg,if (prep_authorize)return g_dbus_create_reply (msg,DBUS_TYPE_INVALID ); +if (offset >= (chrc->max_val_len)) +return g_dbus_create_error (msg, +"org.bluez.Error.InvalidOffset" ,NULL ); +if (write_value (&chrc->value_len, &chrc->value, value, value_len, offset, chrc->max_val_len)) return g_dbus_create_error(msg, --2.7.4
Signature · 1 line
Luiz Augusto von Dentz
Luiz Augusto von Dentz
maintainerHi Thorsten,
Quoted 7 lines · Thorsten (BSH)
Fix dbus error code in case of invalid offset (org.bluez.Error.InvalidOffset).
Ryll, Jan (BSH) (1):
fix dbus error code in case of invalid offset
(org.bluez.Error.InvalidOffset)
Quoted 5 lines
client/gatt.c | 4 ++++ 1 file changed, 4 insertions(+)--
2.7.4
Something is missing here.
Signature · 1 line
Luiz Augusto von Dentz
Hi Luiz,
what is missing?
Regards
Jan
-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Luiz Augusto von Dentz
Sent: Friday, April 3, 2020 11:43 PM
To: Klein, Thorsten (BSH) <[email protected]>
Cc: [email protected]; Klein, Thorsten (GED-SDD2) <[email protected]>
Subject: Re: [PATCH BlueZ] Fix error code in case of invalid offset
Hi Thorsten,
Quoted 7 lines · Thorsten (BSH)
Fix dbus error code in case of invalid offset (org.bluez.Error.InvalidOffset).
Ryll, Jan (BSH) (1):
fix dbus error code in case of invalid offset
(org.bluez.Error.InvalidOffset)
Quoted 5 lines
client/gatt.c | 4 ++++ 1 file changed, 4 insertions(+)--
2.7.4
Something is missing here.
--
Luiz Augusto von Dentz