aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem-messaging.c
diff options
context:
space:
mode:
authorDan Williams <dan@ioncontrol.co>2025-04-19 19:13:53 -0500
committerDan Williams <dan@ioncontrol.co>2025-05-08 20:24:38 -0500
commit97c189910bfb6cf4974a04d34a2e53a8bd1cfdf1 (patch)
tree28d7325e63911c03a838480212565cbf84b76b9b /src/mm-iface-modem-messaging.c
parentc6af442053d9959107c73e564731c3cb85e28981 (diff)
base-sms,sms-list: use signals to set multipart reference
Instead of going through the messaging interface, which just asks the MMSmsList anyway, just go straight to the list. Signed-off-by: Dan Williams <dan@ioncontrol.co>
Diffstat (limited to 'src/mm-iface-modem-messaging.c')
-rw-r--r--src/mm-iface-modem-messaging.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/mm-iface-modem-messaging.c b/src/mm-iface-modem-messaging.c
index 941e58e0..b6b63e49 100644
--- a/src/mm-iface-modem-messaging.c
+++ b/src/mm-iface-modem-messaging.c
@@ -36,54 +36,6 @@ G_DEFINE_INTERFACE (MMIfaceModemMessaging, mm_iface_modem_messaging, MM_TYPE_IFA
/*****************************************************************************/
-guint8
-mm_iface_modem_messaging_get_local_multipart_reference (MMIfaceModemMessaging *self,
- const gchar *number,
- GError **error)
-{
- MMSmsList *list = NULL;
- guint8 reference;
- guint8 first;
-
- /* Start by looking for a random number */
- reference = g_random_int_range (1,255);
-
- /* Then, look for the given reference in user-created messages */
- g_object_get (self,
- MM_IFACE_MODEM_MESSAGING_SMS_LIST, &list,
- NULL);
- if (!list)
- return reference;
-
- first = reference;
- do {
- if (!mm_sms_list_has_local_multipart_reference (list, number, reference)) {
- g_object_unref (list);
- return reference;
- }
-
- if (reference == 255)
- reference = 1;
- else
- reference++;
- }
- while (reference != first);
-
- g_object_unref (list);
-
- /* We were not able to find a new valid multipart reference :/
- * return an error */
- g_set_error (error,
- MM_CORE_ERROR,
- MM_CORE_ERROR_TOO_MANY,
- "Cannot create multipart SMS: No valid multipart reference "
- "available for destination number '%s'",
- number);
- return 0;
-}
-
-/*****************************************************************************/
-
void
mm_iface_modem_messaging_bind_simple_status (MMIfaceModemMessaging *self,
MMSimpleStatus *status)