summaryrefslogtreecommitdiff
path: root/mail.local
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2004-12-17 16:20:43 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2004-12-17 16:20:43 +0000
commit26fde04febf14928e533cc7f923f76c98cba5d25 (patch)
treecc4a547dd819ed0c6cf2d9f444331f7da322cd05 /mail.local
parent5e1b0bfbc373116076cd70b7b2a52ea842d32122 (diff)
downloadmailutils-26fde04febf14928e533cc7f923f76c98cba5d25.tar.gz
mailutils-26fde04febf14928e533cc7f923f76c98cba5d25.tar.bz2
(sql_retrieve_quota): Allow for NULL columns
Diffstat (limited to 'mail.local')
-rw-r--r--mail.local/mailquota.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mail.local/mailquota.c b/mail.local/mailquota.c
index 85a8b9618..9fd513255 100644
--- a/mail.local/mailquota.c
+++ b/mail.local/mailquota.c
@@ -216,6 +216,7 @@ sql_retrieve_quota (char *name, size_t *quota)
else
{
rc = RETR_OK;
+ tmp = NULL;
status = mu_sql_get_column (conn, 0, 0, &tmp);
if (status)
{
@@ -224,7 +225,7 @@ sql_retrieve_quota (char *name, size_t *quota)
mu_strerror (status));
rc = RETR_FAILURE;
}
- else if (strcasecmp (tmp, "none") == 0)
+ else if (tmp == NULL || strcasecmp (tmp, "none") == 0)
rc = RETR_UNLIMITED;
else
{
@@ -232,7 +233,8 @@ sql_retrieve_quota (char *name, size_t *quota)
if (get_size (tmp, quota, &p))
{
- mu_error (_("bogus mailbox quota for `%s' (near `%s')"), name, p);
+ mu_error (_("bogus mailbox quota for `%s' (near `%s')"),
+ name, p);
*quota = groupquota;
}
}

Return to:

Send suggestions and report system problems to the System administrator.