dnsproxy: Add error print when DNS response send failed.
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Fri, 22 Jul 2011 07:53:48 +0000 (10:53 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 23 Jul 2011 13:56:19 +0000 (15:56 +0200)
src/dnsproxy.c

index 9701343..d9e291c 100644 (file)
@@ -215,8 +215,11 @@ static void send_response(int sk, unsigned char *buf, int len,
        hdr->arcount = 0;
 
        err = sendto(sk, buf, len, 0, to, tolen);
-       if (err < 0)
+       if (err < 0) {
+               connman_error("Failed to send DNS response: %s",
+                               strerror(errno));
                return;
+       }
 }
 
 static gboolean request_timeout(gpointer user_data)