aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-07-28 08:51:33 +0800
committerChris Toshok <toshok@src.gnome.org>2002-07-28 08:51:33 +0800
commitdad7bd83ff0af51cae48a41c242b05602b971d50 (patch)
tree98b5203dfecfd129f1269701ee53fecee728bfdb
parente205c7947424a6148d11b9ec3b3def5d3a0b8004 (diff)
downloadgsoc2013-evolution-dad7bd83ff0af51cae48a41c242b05602b971d50.tar
gsoc2013-evolution-dad7bd83ff0af51cae48a41c242b05602b971d50.tar.gz
gsoc2013-evolution-dad7bd83ff0af51cae48a41c242b05602b971d50.tar.bz2
gsoc2013-evolution-dad7bd83ff0af51cae48a41c242b05602b971d50.tar.lz
gsoc2013-evolution-dad7bd83ff0af51cae48a41c242b05602b971d50.tar.xz
gsoc2013-evolution-dad7bd83ff0af51cae48a41c242b05602b971d50.tar.zst
gsoc2013-evolution-dad7bd83ff0af51cae48a41c242b05602b971d50.zip
don't save empty strings. (pas_backend_summary_save): print out the errno
2002-07-27 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-summary.c (save_string): don't save empty strings. (pas_backend_summary_save): print out the errno when we fail. svn path=/trunk/; revision=17623
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/backend/pas/pas-backend-summary.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 9ec7dfdb57..5255a627cb 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,9 @@
+2002-07-27 Chris Toshok <toshok@ximian.com>
+
+ * backend/pas/pas-backend-summary.c (save_string): don't save
+ empty strings.
+ (pas_backend_summary_save): print out the errno when we fail.
+
2002-07-26 Ettore Perazzoli <ettore@ximian.com>
* gui/component/addressbook.c: Don't set up the ContactNew and
diff --git a/addressbook/backend/pas/pas-backend-summary.c b/addressbook/backend/pas/pas-backend-summary.c
index 55c9144ed3..a8ed8c05f9 100644
--- a/addressbook/backend/pas/pas-backend-summary.c
+++ b/addressbook/backend/pas/pas-backend-summary.c
@@ -27,6 +27,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <errno.h>
#include <netinet/in.h>
@@ -525,7 +526,7 @@ save_string (const char *str, FILE *fp)
{
int rv;
- if (!str)
+ if (!str || !*str)
return TRUE;
rv = fwrite (str, strlen (str), 1, fp);
@@ -624,7 +625,7 @@ pas_backend_summary_save (PASBackendSummary *summary)
for (i = 0; i < summary->priv->items->len; i ++) {
PASBackendSummaryItem *item = g_ptr_array_index (summary->priv->items, i);
if (!pas_backend_summary_save_item (summary, fp, item)) {
- g_warning ("failed to write an item to new summary file");
+ g_warning ("failed to write an item to new summary file, errno = %d", errno);
goto lose;
}
}