[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-49
From: |
Daniele Forsi |
Subject: |
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-492-gdbe86ab |
Date: |
Fri, 26 Apr 2013 08:07:52 +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 dbe86abefa7bb872da52799d8fc2665cd9f24700 (commit)
from 84b840ab09f5f81751861b4a9652f4555d43e0aa (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=dbe86abefa7bb872da52799d8fc2665cd9f24700
commit dbe86abefa7bb872da52799d8fc2665cd9f24700
Author: Daniele Forsi <address@hidden>
Date: Thu Apr 25 22:55:48 2013 +0200
Fix --writephonebook returning an error at EOF
An error is returned by gn_vcard2phonebook() if the input file contains
an empty line after the last END:VCARD which is the case for files created
by --readphonebook.
diff --git a/common/vcard.c b/common/vcard.c
index 91c1221..6cc2abb 100644
--- a/common/vcard.c
+++ b/common/vcard.c
@@ -352,13 +352,15 @@ GNOKII_API int gn_vcard2phonebook(FILE *f,
gn_phonebook_entry *entry)
}
str_append_printf(&str, buf);
+ retval = -1;
while (fgets(buf, 1024, f)) {
str_append_printf(&str, buf);
- if (BEGINS("END:VCARD"))
+ if (BEGINS("END:VCARD")) {
+ retval = gn_vcardstr2phonebook(str.str, entry);
break;
+ }
}
- retval = gn_vcardstr2phonebook(str.str, entry);
free(str.str);
return retval;
-----------------------------------------------------------------------
Summary of changes:
common/vcard.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
hooks/post-receive
--
libgnokii and core programs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-492-gdbe86ab,
Daniele Forsi <=