From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDt2l-0004BU-14 for qemu-devel@nongnu.org; Fri, 17 Jun 2016 08:38:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDt2g-0008KJ-SF for qemu-devel@nongnu.org; Fri, 17 Jun 2016 08:38:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDt2g-0008KC-Mc for qemu-devel@nongnu.org; Fri, 17 Jun 2016 08:38:34 -0400 References: <1464686839-9547-1-git-send-email-ashijeetacharya@gmail.com> <1466072448-16388-1-git-send-email-ashijeetacharya@gmail.com> From: Paolo Bonzini Message-ID: Date: Fri, 17 Jun 2016 14:38:29 +0200 MIME-Version: 1.0 In-Reply-To: <1466072448-16388-1-git-send-email-ashijeetacharya@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Change net/socket.c to use socket_*() functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ashijeet Acharya , berrange@redhat.com Cc: kraxel@redhat.com, jasowang@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org Thanks, much better! Just one thing: On 16/06/2016 12:20, Ashijeet Acharya wrote: > + case SOCKET_ADDRESS_KIND_INET: > + buf = g_strdup(addr->u.inet.data->host); Please include the port too here. Also, if the host contains a colon (which you can check with strchr), please print it as [HOST]:PORT instead of HOST:PORT. This will help with IPv6. Thanks, Paolo > + break; > + > + case SOCKET_ADDRESS_KIND_UNIX: > + buf = g_strdup(addr->u.q_unix.data->path); > + break; > + > + case SOCKET_ADDRESS_KIND_FD: > + buf = g_strdup(addr->u.fd.data->str); > + break; > + > + default: > + error_setg(errp, "socket family %d unsupported", > + addr->type); > + return NULL;