Ana Guerrero 2024-01-26 21:46:12 +00:00 committed by Git OBS Bridge
commit 8453ed9151
3 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,36 @@
From 76063ef32c4231b68196dec43b21d091c778e87f Mon Sep 17 00:00:00 2001
From: Arnaud Ferraris <aferraris@debian.org>
Date: Sat, 21 Oct 2023 11:43:09 +0200
Subject: [PATCH] libqmi-glib,message: fix 16-bit service on big endian
architectures
The latest release introduces handling of 16-bit service indications.
However, only the raw message data is returned from
`qmi_message_get_service()`, leading to incorrect values on big-endian
architectures. As a consequence, `libqmi` ultimately fails to build as
the corresponding test errors out in this case.
This patch ensures the service indication is correct on all kinds of
architectures.
(cherry picked from commit 6662764338d3127924cfefaa9cf1b0cc4f90a189)
---
src/libqmi-glib/qmi-message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libqmi-glib/qmi-message.c b/src/libqmi-glib/qmi-message.c
index 3e31b4b4..1918a456 100644
--- a/src/libqmi-glib/qmi-message.c
+++ b/src/libqmi-glib/qmi-message.c
@@ -226,7 +226,7 @@ qmi_message_get_service (QmiMessage *self)
if (MESSAGE_IS_QMUX (self))
return (QmiService)((struct full_message *)(self->data))->header.qmux.service;
- return (QmiService)((struct full_message *)(self->data))->header.qrtr.service;
+ return (QmiService)GUINT16_FROM_LE (((struct full_message *)(self->data))->header.qrtr.service);
}
guint8
--
GitLab

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Jan 23 15:14:21 UTC 2024 - Eugenio Paolantonio <eugenio.paolantonio@suse.com>
- Add patch:
* 0001-message-fix-16bit-service-on-big-endian.patch
- Fixes 16-bit service indications on big endian architectures.
Cherry-picked from upstream qmi-1-34 branch
-------------------------------------------------------------------
Fri Nov 10 14:01:04 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@ -27,6 +27,7 @@ License: LGPL-2.1-or-later AND GPL-2.0-or-later
Group: Hardware/Modem
URL: https://gitlab.freedesktop.org/mobile-broadband/libqmi
Source0: %{url}/-/archive/%{version}/%{name}-%{version}.tar.bz2
Patch0: 0001-message-fix-16bit-service-on-big-endian.patch
BuildRequires: help2man
BuildRequires: pkgconfig