(read_bulletin_db): Return success if db does not exist.
Showing
1 changed file
with
8 additions
and
0 deletions
... | @@ -130,10 +130,18 @@ read_bulletin_db (size_t *pnum) | ... | @@ -130,10 +130,18 @@ read_bulletin_db (size_t *pnum) |
130 | rc = mu_dbm_open (bulletin_db_name, &db, MU_STREAM_READ, 0660); | 130 | rc = mu_dbm_open (bulletin_db_name, &db, MU_STREAM_READ, 0660); |
131 | if (rc) | 131 | if (rc) |
132 | { | 132 | { |
133 | if (errno == ENOENT) | ||
134 | { | ||
135 | *pnum = 0; | ||
136 | return 0; | ||
137 | } | ||
138 | else | ||
139 | { | ||
133 | mu_error (_("Unable to open bulletin db for reading: %s"), | 140 | mu_error (_("Unable to open bulletin db for reading: %s"), |
134 | mu_strerror (errno)); | 141 | mu_strerror (errno)); |
135 | return rc; | 142 | return rc; |
136 | } | 143 | } |
144 | } | ||
137 | 145 | ||
138 | memset (&key, 0, sizeof key); | 146 | memset (&key, 0, sizeof key); |
139 | memset (&data, 0, sizeof data); | 147 | memset (&data, 0, sizeof data); | ... | ... |
-
Please register or sign in to post a comment