-int mutt_libesmtp_check_usetls (const char* val) {
- if (str_ncmp (val, "enabled", 7) != 0 &&
- str_ncmp (val, "required", 8) != 0)
+int mutt_libesmtp_check_usetls (const char* option, unsigned long p,
+ char* errbuf, size_t errlen) {
+ char* val = (char*) p;
+ if (!val || !*val)
+ return (1);
+ if (m_strncmp(val, "enabled", 7) != 0 &&
+ m_strncmp(val, "required", 8) != 0) {
+ if (errbuf)
+ snprintf (errbuf, errlen, _("'%s' is invalid for %s"), val, option);