aboutsummaryrefslogtreecommitdiff
path: root/src/util/bio.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-08-07 16:55:16 +0000
committerChristian Grothoff <christian@grothoff.org>2010-08-07 16:55:16 +0000
commitb9de10a83f130b2c0a4513a1f713d778fbb4ecc1 (patch)
tree0dcfa912e2eea217d494ba56f1373e2c0cbb7e26 /src/util/bio.c
parentd4115af6385dcab2433b27796e777819e297dae7 (diff)
downloadgnunet-b9de10a83f130b2c0a4513a1f713d778fbb4ecc1.tar.gz
gnunet-b9de10a83f130b2c0a4513a1f713d778fbb4ecc1.zip
do not fail if datastore unavailable
Diffstat (limited to 'src/util/bio.c')
-rw-r--r--src/util/bio.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/util/bio.c b/src/util/bio.c
index 059638ff1..3fc7d05e6 100644
--- a/src/util/bio.c
+++ b/src/util/bio.c
@@ -79,10 +79,16 @@ GNUNET_BIO_read_open (const char *fn)
79int 79int
80GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg) 80GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg)
81{ 81{
82 *emsg = h->emsg; 82 int err;
83
84 err = (NULL == h->emsg) ? GNUNET_OK : GNUNET_SYSERR;
85 if (emsg != NULL)
86 *emsg = h->emsg;
87 else
88 GNUNET_free_non_null (h->emsg);
83 GNUNET_DISK_file_close (h->fd); 89 GNUNET_DISK_file_close (h->fd);
84 GNUNET_free (h); 90 GNUNET_free (h);
85 return (NULL == *emsg) ? GNUNET_OK : GNUNET_SYSERR; 91 return err;
86} 92}
87 93
88 94