pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/comms/gammu



Module Name:    pkgsrc
Committed By:   manu
Date:           Sun Sep 24 00:50:48 UTC 2023

Modified Files:
        pkgsrc/comms/gammu: Makefile distinfo
        pkgsrc/comms/gammu/patches: patch-libgammu_phone_at_at-sms.c

Log Message:
Skip garbage reply on AT+CMGL in PDU mode as in text mode

>From upstream https://github.com/gammu/gammu/pull/823

THe D-Link DWM222 4G USB modem sends a garbage line before the reply
to AT+CMGL. This case was handled in text mode but not in PDU mode,
and this device exhibit the bad behavior in PDU mode too.

This change brings garbage skip behavior in PDU mode on par with text mode.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 pkgsrc/comms/gammu/Makefile
cvs rdiff -u -r1.23 -r1.24 pkgsrc/comms/gammu/distinfo
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/comms/gammu/patches/patch-libgammu_phone_at_at-sms.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/comms/gammu/Makefile
diff -u pkgsrc/comms/gammu/Makefile:1.51 pkgsrc/comms/gammu/Makefile:1.52
--- pkgsrc/comms/gammu/Makefile:1.51    Tue Jun  6 12:40:23 2023
+++ pkgsrc/comms/gammu/Makefile Sun Sep 24 00:50:48 2023
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.51 2023/06/06 12:40:23 riastradh Exp $
+# $NetBSD: Makefile,v 1.52 2023/09/24 00:50:48 manu Exp $
 #
 
 DISTNAME=      gammu-1.41.0
-PKGREVISION=   10
+PKGREVISION=   11
 CATEGORIES=    comms
 MASTER_SITES=  http://dl.cihar.com/gammu/releases/
 EXTRACT_SUFX=  .tar.bz2

Index: pkgsrc/comms/gammu/distinfo
diff -u pkgsrc/comms/gammu/distinfo:1.23 pkgsrc/comms/gammu/distinfo:1.24
--- pkgsrc/comms/gammu/distinfo:1.23    Tue Oct 26 10:05:59 2021
+++ pkgsrc/comms/gammu/distinfo Sun Sep 24 00:50:48 2023
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.23 2021/10/26 10:05:59 nia Exp $
+$NetBSD: distinfo,v 1.24 2023/09/24 00:50:48 manu Exp $
 
 BLAKE2s (gammu-1.41.0.tar.bz2) = 0a20211fb829bd9dba62e2494f0f235d54e8d78fd840e09e87b962a63208974b
 SHA512 (gammu-1.41.0.tar.bz2) = f2c2534d3827216bf015607431938e0cf2524d5f2c670a5f76bb5ab7928962d22de981bbbf2dfa7af833c7903b60a775242048210bac6c35b1a9ee7668db4543
 Size (gammu-1.41.0.tar.bz2) = 2167233 bytes
 SHA1 (patch-contrib_smscgi_sms__cgi.c) = 39598119eae4fd27d6d1844ca4a846fc79b126c1
 SHA1 (patch-libgammu_gsmstate.c) = ac870d432d949388ae790f35dd00ac0401e23527
-SHA1 (patch-libgammu_phone_at_at-sms.c) = fb9dd703f822f20efa35303b15faba482e39538c
+SHA1 (patch-libgammu_phone_at_at-sms.c) = be863fcb0b227b92f117f8632db3cae5dcbe7d29
 SHA1 (patch-smsd_services_pgsql.c) = 35d30183851c6d6b14e0450b59a56c858889e701
 SHA1 (patch-smsd_services_sql.c) = 62a2c113f18d767360a598284ac1083b9abb1f29

Index: pkgsrc/comms/gammu/patches/patch-libgammu_phone_at_at-sms.c
diff -u pkgsrc/comms/gammu/patches/patch-libgammu_phone_at_at-sms.c:1.3 pkgsrc/comms/gammu/patches/patch-libgammu_phone_at_at-sms.c:1.4
--- pkgsrc/comms/gammu/patches/patch-libgammu_phone_at_at-sms.c:1.3     Mon Aug 17 16:42:53 2015
+++ pkgsrc/comms/gammu/patches/patch-libgammu_phone_at_at-sms.c Sun Sep 24 00:50:48 2023
@@ -1,11 +1,22 @@
-$NetBSD: patch-libgammu_phone_at_at-sms.c,v 1.3 2015/08/17 16:42:53 leot Exp $
+$NetBSD: patch-libgammu_phone_at_at-sms.c,v 1.4 2023/09/24 00:50:48 manu Exp $
 
-Don't use strcharnul from the helper library, it doesn't end up as PIC
-when compiled with Clang.
+1) Don't use strcharnul from the helper library, it doesn't end 
+up as PIC when compiled with Clang.
 
---- libgammu/phone/at/at-sms.c.orig    2015-08-14 12:32:29.000000000 +0000
-+++ libgammu/phone/at/at-sms.c
-@@ -112,6 +112,9 @@ GSM_Error ATGEN_ReplyGetSMSMemories(GSM_
+2) Skip garbage reply on AT+CMGL in PDU mode as in text mode
+
+From upstream https://github.com/gammu/gammu/pull/823
+
+THe D-Link DWM222 4G USB modem sends a garbage line before the reply
+to AT+CMGL. This case was handled in text mode but not in PDU mode,
+and this device exhibit the bad behavior in PDU mode too.
+
+This change brings garbage skip behavior in PDU mode on par with text mode.
+
+--- libgammu/phone/at/at-sms.c.orig    2019-09-27 10:55:52.000000000 +0200
++++ libgammu/phone/at/at-sms.c 2023-09-24 02:44:57.292835696 +0200
+@@ -113,8 +113,11 @@
+               }
                if (pos_start != NULL) {
                        /* Detect which memories we can use for saving */
                        pos_end = strchrnul(pos_start + 1, ')');
@@ -15,3 +26,19 @@ when compiled with Clang.
                        pos_tmp = strstr(pos_start, "\"SM\"");
  
                        if (pos_tmp != NULL && pos_tmp < pos_end) {
+                               Priv->SIMSaveSMS = AT_AVAILABLE;
+@@ -1144,14 +1147,9 @@
+               if (str == NULL) {
+                       /*
+                        * Sometimes an SMS message will contain a line break. In SMS text
+                          * mode we skip to the next line and try again to find +CMGL.
+-                       * FIXME: Can we do the same for SMS PDU mode?
+                        */
+-                      if (Priv->SMSMode == SMS_AT_PDU) {
+-                              smprintf(s, "Can not find +CMGL:!\n");
+-                              return ERR_UNKNOWN;
+-                      }
+                       continue;
+               }
+ 
+               /* Parse reply */



Home | Main Index | Thread Index | Old Index