Commit b490f6d8 b490f6d87bc2f20269f1adacd9a419314068e19f by Sergey Poznyakoff

Define USE_MAILBOX_QUOTAS after including mu_dbm.h

1 parent e8ac3e5d
......@@ -68,11 +68,6 @@
# define INADDR_LOOPBAK 0x7f000001
#endif
#if defined (USE_DBM) || defined (USE_SQL)
# define USE_MAILBOX_QUOTAS 1
#endif
#include <mailutils/argp.h>
#include <mailutils/attribute.h>
#include <mailutils/errno.h>
#include <mailutils/error.h>
......@@ -92,6 +87,11 @@
#include <mu_asprintf.h>
#include <getline.h>
#if defined (USE_DBM) || defined (USE_SQL)
# define USE_MAILBOX_QUOTAS 1
#endif
#include <mailutils/argp.h>
/* Debug */
extern int debug_level;
#define dbg() if (debug_level) debug
......
......@@ -76,9 +76,15 @@ dbm_retrieve_quota (char *name, size_t *quota)
int unlimited = 0;
int rc;
if (!quotadbname || mu_dbm_open (quotadbname, &db, MU_STREAM_READ, 0600))
if (!quotadbname)
return RETR_FAILURE;
if (mu_dbm_open (quotadbname, &db, MU_STREAM_READ, 0600))
{
mu_error (_("Cannot open %s: %s"), quotadbname, mu_strerror (errno));
return RETR_FAILURE;
}
memset (&named, 0, sizeof named);
memset (&contentd, 0, sizeof contentd);
MU_DATUM_PTR (named) = name;
......