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-44


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-445-g1f930a0
Date: Sat, 09 Mar 2013 13:23:29 +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  1f930a05a997b388c4aecea94a6cd78e22bb6393 (commit)
      from  a75482accb270def62cd0d819faf128165b0ab35 (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=1f930a05a997b388c4aecea94a6cd78e22bb6393


commit 1f930a05a997b388c4aecea94a6cd78e22bb6393
Author: Daniele Forsi <address@hidden>
Date:   Sat Mar 9 14:21:37 2013 +0100

    Fix writing binary files on non-POSIX sistems
    
    Fixes --getfile --getfilebyid --getallfiles and --getmms (when
    used with --pdu and --raw).

diff --git a/ChangeLog b/ChangeLog
index c4bb19d..4fda4d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -81,6 +81,9 @@
     o change the value used for VOICE phonebook memory, containing
       the phone number(s) to be used to listen to voicemail, which
       was used for MT which now is unsupported      (Daniele Forsi)
+ * gnokii updates
+    o fix --getfile --getfilebyid --getallfiles and --getmms on
+      non-POSIX sistems (eg. Windows)               (Daniele Forsi)
 
 0.6.31
 ======
diff --git a/gnokii/gnokii-file.c b/gnokii/gnokii-file.c
index 013be47..eba23aa 100644
--- a/gnokii/gnokii-file.c
+++ b/gnokii/gnokii-file.c
@@ -271,7 +271,7 @@ gn_error getfile(int argc, char *argv[], gn_data *data, 
struct gn_statemachine *
                } else {
                        snprintf(filename2, sizeof(filename2), "%s", 
argv[optind]);
                }
-               f = fopen(filename2, "w");
+               f = fopen(filename2, "wb");
                if (!f) {
                        fprintf(stderr, _("Can't open file %s for writing!\n"), 
filename2);
                        return GN_ERR_FAILED;
@@ -326,7 +326,7 @@ gn_error getfilebyid(int argc, char *argv[], gn_data *data, 
struct gn_statemachi
                        } else {
                                snprintf(filename2, sizeof(filename2), "%s", 
argv[optind]);
                        }
-                       f = fopen(filename2, "w");
+                       f = fopen(filename2, "wb");
                        if (!f) {
                                fprintf(stderr, _("Can't open file %s for 
writing!\n"), filename2);
                                return GN_ERR_FAILED;
@@ -377,7 +377,7 @@ gn_error getallfiles(char *path, gn_data *data, struct 
gn_statemachine *state)
                                fprintf(stderr, _("Failed to get file %s: 
%s\n"), data->file->name, gn_error_print(error));
                        else {
                                fprintf(stderr, _("Got file %s.\n"), filename2);
-                               f = fopen(filename2, "w");
+                               f = fopen(filename2, "wb");
                                if (!f) {
                                        fprintf(stderr, _("Can't open file %s 
for writing!\n"), filename2);
                                        return GN_ERR_FAILED;
diff --git a/gnokii/gnokii-utils.c b/gnokii/gnokii-utils.c
index d35f1a9..e0fc69e 100644
--- a/gnokii/gnokii-utils.c
+++ b/gnokii/gnokii-utils.c
@@ -95,10 +95,10 @@ int writebuffer(const char *filename, const char *buffer, 
size_t nitems, int mod
 
        /* append */
        if (mode == 2)
-               file = fopen(filename, "a");
+               file = fopen(filename, "ab");
        /* overwrite */
        else
-               file = fopen(filename, "w");
+               file = fopen(filename, "wb");
 
        if (!file) {
                fprintf(stderr, _("Can't open file %s for writing!\n"),  
filename);

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

Summary of changes:
 ChangeLog             |    3 +++
 gnokii/gnokii-file.c  |    6 +++---
 gnokii/gnokii-utils.c |    4 ++--
 3 files changed, 8 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

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