summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-07-09 18:03:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-10 14:21:57 +0100
commit56e0835872574e26098c19ac712b5fda7bc924fd (patch)
treed40219b2979a90b9fcc4427dd7e20a0f61ad1f04 /meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch
parent2e80a0b1f8cf023c6fb2b940e686b07f475205eb (diff)
downloadpoky-56e0835872574e26098c19ac712b5fda7bc924fd.tar.gz
libgsmd - remove
This project has been unmaintained for some time, and even the OpenMoko project is not using it any more (in favour of FSO). Since we have ofono in OE-Core which replaces and surpasses its functionality, we can remove libgsmd. (From OE-Core rev: 4cd880c61e9d74dbf1a747f3654239cadadf45ce) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch')
-rw-r--r--meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch72
1 files changed, 0 insertions, 72 deletions
diff --git a/meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch b/meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch
deleted file mode 100644
index 3aa13df01c..0000000000
--- a/meta/recipes-connectivity/gsm/files/024_sms-text-in-bracket.patch
+++ /dev/null
@@ -1,72 +0,0 @@
1http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=834
2
3From: Kristian Mueller <kristian@mput.de>
4Subject: [PATCH] libgsmd-tool does not allow sms with more than one word
5
6libgsmd-tool only allows for command strings without spaces.
7SMS messages with more than one word will be parsed as multible commands.
8The patch introduces SMS message text in bracket and fixes a NULL pointer
9reference on mailformed "ss" commands.
10
11Signed-off-by: Jim Huang <jserv@openmoko.org>
12
13Upstream-Status: Inappropriate [not used]
14---
15 src/util/shell.c | 32 ++++++++++++++++++++++++++------
16 1 file changed, 26 insertions(+), 6 deletions(-)
17
18Index: gsm/src/util/shell.c
19===================================================================
20--- gsm.orig/src/util/shell.c 2007-08-31 16:15:30.000000000 +0800
21+++ gsm/src/util/shell.c 2007-09-17 23:35:31.000000000 +0800
22@@ -389,7 +389,7 @@
23 "\tsd\tSMS Delete (sd=index,delflg)\n"
24 "\tsl\tSMS List (sl=stat)\n"
25 "\tsr\tSMS Read (sr=index)\n"
26- "\tss\tSMS Send (ss=number,text)\n"
27+ "\tss\tSMS Send (ss=number,text|[\"text\"])\n"
28 "\tsw\tSMS Write (sw=stat,number,text)\n"
29 "\tsm\tSMS Storage stats\n"
30 "\tsM\tSMS Set preferred storage (sM=mem1,mem2,mem3)\n"
31@@ -612,16 +612,36 @@
32
33 lgsm_sms_read(lgsmh, atoi(ptr+1));
34 } else if ( !strncmp(buf, "ss", 2)) {
35- printf("Send SMS\n");
36 struct lgsm_sms sms;
37
38 ptr = strchr(buf, '=');
39 fcomma = strchr(buf, ',');
40- strncpy(sms.addr, ptr+1, fcomma-ptr-1);
41- sms.addr[fcomma-ptr-1] = '\0';
42- packing_7bit_character(fcomma+1, &sms);
43+ if (!ptr || !fcomma) {
44+ printf("Wrong command format\n");
45+ } else {
46+ strncpy(sms.addr, ptr+1, fcomma-ptr-1);
47+ sms.addr[fcomma-ptr-1] = '\0';
48+
49+ /* todo define \" to allow " in text */
50+ if (fcomma[1] == '"' &&
51+ !strchr(fcomma+2, '"')) {
52+ /* read until closing '"' */
53+ rc = fscanf(stdin, "%[^\"]\"",
54+ fcomma+strlen(fcomma));
55+ if (rc == EOF) {
56+ printf("EOF\n");
57+ return -1;
58+ }
59+ /* remove brackets */
60+ fcomma++;
61+ fcomma[strlen(fcomma)] = '\0';
62+ }
63+
64+ printf("Send SMS\n");
65+ packing_7bit_character(fcomma+1, &sms);
66
67- lgsm_sms_send(lgsmh, &sms);
68+ lgsm_sms_send(lgsmh, &sms);
69+ }
70 } else if ( !strncmp(buf, "sw", 2)) {
71 printf("Write SMS\n");
72 struct lgsm_sms_write sms_write;