Commit 5d93410a 5d93410a78043ec770280a75fb28d8424076d23c by Sergey Poznyakoff

(mu_auth_data_alloc): Fill auth object with zeroes.

(mu_auth_data_set_quota): New function
1 parent 37356b4a
......@@ -79,7 +79,7 @@ mu_auth_data_alloc (struct mu_auth_data **ptr,
strlen (mailbox) + 1;
char *p;
*ptr = malloc (size);
*ptr = calloc (1, size);
if (!*ptr)
return ENOMEM;
......@@ -103,6 +103,13 @@ mu_auth_data_alloc (struct mu_auth_data **ptr,
}
void
mu_auth_data_set_quota (struct mu_auth_data *ptr, mu_off_t q)
{
ptr->flags |= MU_AF_QUOTA;
ptr->quota = q;
}
void
mu_auth_data_free (struct mu_auth_data *ptr)
{
free (ptr);
......@@ -182,7 +189,8 @@ static mu_list_t mu_auth_by_name_list, _tmp_auth_by_name_list;
static mu_list_t mu_auth_by_uid_list, _tmp_auth_by_uid_list;
int
mu_get_auth (struct mu_auth_data **auth, enum mu_auth_key_type type, const void *key)
mu_get_auth (struct mu_auth_data **auth, enum mu_auth_key_type type,
const void *key)
{
mu_list_t list;
......