Module: kamailio
Branch: master
Commit: ee052fd0a7e7dc703a186a01926a8e64c635d636
URL:
https://github.com/kamailio/kamailio/commit/ee052fd0a7e7dc703a186a01926a8e6…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2024-10-08T14:58:40+02:00
sms: fix warning and remove old logic
Warning: libsms_getsms.c:107:25: warning: implicit
conversion from 'int' to 'char' changes value from 183 to -73
[-Wconstant-conversion]
107 | ascii[charcounter] = 183;
| ~ ^~~
1 warning generated.
---
Modified: src/modules/sms/libsms_getsms.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ee052fd0a7e7dc703a186a01926a8e6…
Patch:
https://github.com/kamailio/kamailio/commit/ee052fd0a7e7dc703a186a01926a8e6…
---
diff --git a/src/modules/sms/libsms_getsms.c b/src/modules/sms/libsms_getsms.c
index 4181560490e..1909c78bcc9 100644
--- a/src/modules/sms/libsms_getsms.c
+++ b/src/modules/sms/libsms_getsms.c
@@ -101,12 +101,7 @@ static int pdu2ascii(char *pdu, char *ascii)
bitposition++;
c = (c >> 1) & 127; /* The shift fills with 1, but I want 0 */
}
- if(/*cs_convert*/ 1)
- ascii[charcounter] = sms2ascii(c);
- else if(c == 0)
- ascii[charcounter] = 183;
- else
- ascii[charcounter] = c;
+ ascii[charcounter] = sms2ascii(c);
}
ascii[count] = 0;
return count;