Skip to content
Snippets Groups Projects
Commit 0bd6f501 authored by Martin Nilsson's avatar Martin Nilsson
Browse files

Removed some unneeded layers of sprintf.

Rev: lib/modules/Protocols.pmod/DNS.pmod:1.81
parent 44ab6f2f
No related branches found
No related tags found
No related merge requests found
// $Id: DNS.pmod,v 1.80 2003/08/22 14:25:27 nilsson Exp $ // $Id: DNS.pmod,v 1.81 2003/10/21 03:10:39 nilsson Exp $
// Not yet finished -- Fredrik Hubinette // Not yet finished -- Fredrik Hubinette
//! Domain Name System //! Domain Name System
...@@ -517,8 +517,8 @@ class server ...@@ -517,8 +517,8 @@ class server
if (err = catch { if (err = catch {
q=decode_res(m->data); q=decode_res(m->data);
}) { }) {
werror(sprintf("DNS: Failed to read UDP packet.\n" werror("DNS: Failed to read UDP packet.\n%s\n",
"%s\n", describe_backtrace(err))); describe_backtrace(err));
if(m && m->data && sizeof(m->data)>=2) if(m && m->data && sizeof(m->data)>=2)
send_reply((["rcode":1]), send_reply((["rcode":1]),
mkmapping(({"id"}), array_sscanf(m->data, "%2c")), m); mkmapping(({"id"}), array_sscanf(m->data, "%2c")), m);
...@@ -717,8 +717,8 @@ class client ...@@ -717,8 +717,8 @@ class client
// Not an IP-number! // Not an IP-number!
string host = rest; string host = rest;
if (!(rest = match_etc_hosts(host))) { if (!(rest = match_etc_hosts(host))) {
werror(sprintf("Protocols.DNS.client(): " werror("Protocols.DNS.client(): "
"Can't resolv nameserver \"%s\"\n", host)); "Can't resolv nameserver \"%s\"\n", host);
break; break;
} }
} }
...@@ -1141,9 +1141,8 @@ class async_client ...@@ -1141,9 +1141,8 @@ class async_client
r->callback(r->domain,decode_res(m->data),@r->args); r->callback(r->domain,decode_res(m->data),@r->args);
destruct(r); destruct(r);
}) { }) {
werror(sprintf("DNS: Failed to read UDP packet. Connection refused?\n" werror("DNS: Failed to read UDP packet. Connection refused?\n%s\n",
"%s\n", describe_backtrace(err));
describe_backtrace(err)));
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment