gnokii-commit
[Top][All Lists]
Advanced

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

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-51


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-511-g4a7ec39
Date: Mon, 29 Apr 2013 09:29:36 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".

The branch, master has been updated
       via  4a7ec39382c0d80328e0c4036da6fcf6a7da373f (commit)
      from  648edfa93ef31e41a3c0b0b77c371132aeb3a816 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=4a7ec39382c0d80328e0c4036da6fcf6a7da373f


commit 4a7ec39382c0d80328e0c4036da6fcf6a7da373f
Author: Daniele Forsi <address@hidden>
Date:   Mon Apr 29 11:14:09 2013 +0200

    Reading 0 bytes is a simpler way to send an empty SMS
    
    Empty SMS are allowed on purpose as requested by an user since commit
    8c4f263c6c8b99d042231caf3006b95d54128a99
    This also removes one translatable string.
    After this change this is possible:
    gnokii --sendsms +123456789 </dev/null
    Before this change the only way to send an empty SMS was to give an
    empty line:
    echo | gnokii --sendsms +123456789
    A trailing \n is still stripped by readtext() so this still works.

diff --git a/gnokii/gnokii-utils.c b/gnokii/gnokii-utils.c
index d272ba6..a62318f 100644
--- a/gnokii/gnokii-utils.c
+++ b/gnokii/gnokii-utils.c
@@ -126,11 +126,6 @@ gn_error readtext(gn_sms_user_data *udata)
 
        /* Get message text from stdin. */
        chars_read = fread(message_buffer, 1, sizeof(message_buffer), stdin);
-
-       if (chars_read == 0) {
-               fprintf(stderr, _("Couldn't read from stdin!\n"));
-               return GN_ERR_FAILED;
-       }
        if (udata->type != GN_SMS_DATA_iMelody && chars_read > 0 && 
message_buffer[chars_read - 1] == '\n')
                message_buffer[--chars_read] = 0;
        if (chars_read > (sizeof(udata->u.text) - 1)) {
diff --git a/testsuite/out.30.emptysms b/testsuite/out.30.emptysms
index a0e9d21..d773f9d 100644
--- a/testsuite/out.30.emptysms
+++ b/testsuite/out.30.emptysms
@@ -1,3 +1,6 @@
 AT+CMGS=18
 0011001491214365870921436587090000C400
 Send succeeded with reference 1!
+AT+CMGS=18
+0011001491214365870921436587090000C400
+Send succeeded with reference 1!
diff --git a/testsuite/test.30.emptysms b/testsuite/test.30.emptysms
index 4173c5c..0f75bbb 100644
--- a/testsuite/test.30.emptysms
+++ b/testsuite/test.30.emptysms
@@ -1,2 +1,4 @@
-# Empty SMS allowed on purpose since commit 
8c4f263c6c8b99d042231caf3006b95d54128a99 send to longest allowed number
+# Both commands below should result in the same PDU (test also sending to 
longest allowed number)
+# Empty SMS are allowed on purpose since commit 
8c4f263c6c8b99d042231caf3006b95d54128a99
 echo | $GNOKII --sendsms +12345678901234567890 --validity 43200
+$GNOKII --sendsms +12345678901234567890 --validity 43200 </dev/null

-----------------------------------------------------------------------

Summary of changes:
 gnokii/gnokii-utils.c      |    5 -----
 testsuite/out.30.emptysms  |    3 +++
 testsuite/test.30.emptysms |    4 +++-
 3 files changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]