diff options
Diffstat (limited to 'src/bi_dns.m4')
-rw-r--r-- | src/bi_dns.m4 | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/bi_dns.m4 b/src/bi_dns.m4 index 7e92c964..ad09ee1b 100644 --- a/src/bi_dns.m4 +++ b/src/bi_dns.m4 @@ -1,5 +1,5 @@ /* This file is part of mailfromd. -*- c -*- - Copyright (C) 2006, 2007 Sergey Poznyakoff + Copyright (C) 2006, 2007, 2008 Sergey Poznyakoff This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ MF_DEFUN(primitive_hostname, STRING, STRING string) stat = resolve_ipstr(string, &hbuf); MF_ASSERT(stat == mf_success, - stat, + mf_status_to_exception(stat), _("Cannot resolve IP %s"), string); @@ -43,12 +43,12 @@ MF_DEFUN(primitive_resolve, STRING, STRING string, OPTIONAL, STRING domain) if (MF_OPTVAL(domain,"")[0]) { stat = resolve_ipstr_domain(string, domain, &ipstr); MF_ASSERT(stat == mf_success, - stat, + mf_status_to_exception(stat), _("Cannot resolve %s.%s"), string, domain); } else { stat = resolve_hostname(string, &ipstr); MF_ASSERT(stat == mf_success, - stat, + mf_status_to_exception(stat), _("Cannot resolve %s"), string); } pushs(env, ipstr); @@ -117,7 +117,7 @@ MF_DEFUN(dns_getname, STRING, STRING ipstr) char *names[64]; MF_ASSERT(inet_aton(ipstr, &addr), - mf_invip, + mfe_invip, _("Invalid IP: %s"), ipstr); dnstat = ptr_lookup(addr, names, NELEMS(names), &ttl, NULL, 0); @@ -160,7 +160,7 @@ MF_DEFUN(primitive_hasmx, NUMBER, STRING string) mxstat = getmx(string, mxbuf); MF_ASSERT(mxstat == mf_success || mxstat == mf_not_found, - mxstat, + mf_status_to_exception(mxstat), _("Cannot get MX records for %s"), string); @@ -182,7 +182,7 @@ MF_DEFUN(getmx, STRING, STRING domain, OPTIONAL, NUMBER resolve) else mxstat = getmx(domain, mxbuf); MF_ASSERT(mxstat == mf_success || mxstat == mf_not_found, - mxstat, + mf_status_to_exception(mxstat), _("Cannot get MX records for %s"), domain); if (mxstat == mf_not_found) MF_RETURN_STRING(""); @@ -220,9 +220,9 @@ resolve_host(const char *string, unsigned long *ip) rc = inet_aton(ipstr, &addr); free(ipstr); if (rc == 0) { - mu_error(_("INTERNAL ERROR at %s:%lu: resolve_hostname returned " + mu_error(_("INTERNAL ERROR at %s:%d: resolve_hostname returned " "invalid IP address: %s"), - __FILE__, __FILE__, ipstr); + __FILE__, __LINE__, ipstr); return 1; } *ip = addr.s_addr; @@ -237,13 +237,13 @@ MF_DEFUN(primitive_ismx, NUMBER, STRING domain, STRING ipstr) int rc = 0; int i; - MF_ASSERT(resolve_host(ipstr, &ip) == 0, mf_noresolve, + MF_ASSERT(resolve_host(ipstr, &ip) == 0, mfe_noresolve, _("Cannot resolve host name %s"), ipstr); mxstat = getmx(domain, mxbuf); MF_ASSERT(mxstat == mf_success, - mxstat, + mf_status_to_exception(mxstat), _("Cannot get MXs for %s"), domain); for (i = 0; i < MAXMXCOUNT && mxbuf[i]; i++) { |