Commit 5845efba 5845efba26f3dcae8718fe9d447a6071e9255af4 by Sergey Poznyakoff

* auth/sql.c (get_field): NULL value in an optional field is

equivalent to MU_ERR_NOENT.
1 parent 8d4b5c02
2008-11-21 Sergey Poznyakoff <gray@gnu.org.ua>
* auth/sql.c (get_field): NULL value in an optional field is
equivalent to MU_ERR_NOENT.
2008-11-18 Sergey Poznyakoff <gray@gnu.org.ua>
* mailbox/amd.c (_amd_attach_message): Call mu_body_clear_modified
......
......@@ -180,10 +180,15 @@ get_field (mu_sql_connection_t conn, const char *id, char **ret, int mandatory)
}
else if (!*ret)
{
if (mandatory)
{
mu_error (_("SQL field `%s' (`%s') has NULL value"),
id, name ? *name : id);
rc = MU_ERR_READ;
}
else
rc = MU_ERR_NOENT;
}
return rc;
}
......