String in bytes konvertieren.
fuer send_udp() wird eine Bytesequenz gebraucht.
Und wir gehen davon aus, dass alle Hostnamen
ASCII sind.
Change-Id: I55fcdb9962d287d461d28d62f5ede3452f1eaddf
diff --git a/p/daemon/dnslookup.c b/p/daemon/dnslookup.c
index d86ea3b..1808f97 100644
--- a/p/daemon/dnslookup.c
+++ b/p/daemon/dnslookup.c
@@ -42,7 +42,8 @@
// eigentliche Anfrage an den externen Resolver senden.
protected void make_request(string hostname)
{
- send_udp( IPLOOKUP_HOST, IPLOOKUP_PORT, hostname+"\n" );
+ send_udp( IPLOOKUP_HOST, IPLOOKUP_PORT,
+ to_bytes(hostname+"\n","ASCII") );
if (sizeof(cache) > 1000)
reset();
cache[hostname]=0; // cached request, but unknown result (yet)
diff --git a/p/daemon/iplookup.c b/p/daemon/iplookup.c
index 7608d8f..724f261 100644
--- a/p/daemon/iplookup.c
+++ b/p/daemon/iplookup.c
@@ -124,7 +124,7 @@
* Daten ueberschrieben.
*/
static void make_request( string ipnum ) {
- send_udp( IPLOOKUP_HOST, IPLOOKUP_PORT, ipnum );
+ send_udp( IPLOOKUP_HOST, IPLOOKUP_PORT, to_bytes(ipnum, "ASCII") );
ipmap += ([ ipnum : ipnum ; SEARCHING ;
time()+QUERY_TIME ; STATUS_QUERYING
]);