Define USE_MAILBOX_QUOTAS after including mu_dbm.h
Showing
2 changed files
with
13 additions
and
7 deletions
... | @@ -68,11 +68,6 @@ | ... | @@ -68,11 +68,6 @@ |
68 | # define INADDR_LOOPBAK 0x7f000001 | 68 | # define INADDR_LOOPBAK 0x7f000001 |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | #if defined (USE_DBM) || defined (USE_SQL) | ||
72 | # define USE_MAILBOX_QUOTAS 1 | ||
73 | #endif | ||
74 | |||
75 | #include <mailutils/argp.h> | ||
76 | #include <mailutils/attribute.h> | 71 | #include <mailutils/attribute.h> |
77 | #include <mailutils/errno.h> | 72 | #include <mailutils/errno.h> |
78 | #include <mailutils/error.h> | 73 | #include <mailutils/error.h> |
... | @@ -92,6 +87,11 @@ | ... | @@ -92,6 +87,11 @@ |
92 | #include <mu_asprintf.h> | 87 | #include <mu_asprintf.h> |
93 | #include <getline.h> | 88 | #include <getline.h> |
94 | 89 | ||
90 | #if defined (USE_DBM) || defined (USE_SQL) | ||
91 | # define USE_MAILBOX_QUOTAS 1 | ||
92 | #endif | ||
93 | |||
94 | #include <mailutils/argp.h> | ||
95 | /* Debug */ | 95 | /* Debug */ |
96 | extern int debug_level; | 96 | extern int debug_level; |
97 | #define dbg() if (debug_level) debug | 97 | #define dbg() if (debug_level) debug | ... | ... |
... | @@ -76,9 +76,15 @@ dbm_retrieve_quota (char *name, size_t *quota) | ... | @@ -76,9 +76,15 @@ dbm_retrieve_quota (char *name, size_t *quota) |
76 | int unlimited = 0; | 76 | int unlimited = 0; |
77 | int rc; | 77 | int rc; |
78 | 78 | ||
79 | if (!quotadbname || mu_dbm_open (quotadbname, &db, MU_STREAM_READ, 0600)) | 79 | if (!quotadbname) |
80 | return RETR_FAILURE; | 80 | return RETR_FAILURE; |
81 | 81 | ||
82 | if (mu_dbm_open (quotadbname, &db, MU_STREAM_READ, 0600)) | ||
83 | { | ||
84 | mu_error (_("Cannot open %s: %s"), quotadbname, mu_strerror (errno)); | ||
85 | return RETR_FAILURE; | ||
86 | } | ||
87 | |||
82 | memset (&named, 0, sizeof named); | 88 | memset (&named, 0, sizeof named); |
83 | memset (&contentd, 0, sizeof contentd); | 89 | memset (&contentd, 0, sizeof contentd); |
84 | MU_DATUM_PTR (named) = name; | 90 | MU_DATUM_PTR (named) = name; | ... | ... |
-
Please register or sign in to post a comment