From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQyez-0000YU-Ny for qemu-devel@nongnu.org; Wed, 03 Feb 2016 09:44:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQyeu-0002Nj-NX for qemu-devel@nongnu.org; Wed, 03 Feb 2016 09:43:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQyeu-0002Nc-I2 for qemu-devel@nongnu.org; Wed, 03 Feb 2016 09:43:52 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 302A38050F for ; Wed, 3 Feb 2016 14:43:52 +0000 (UTC) Date: Wed, 3 Feb 2016 14:43:48 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20160203144348.GE12907@work-vm> References: <1454507331-30729-1-git-send-email-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454507331-30729-1-git-send-email-berrange@redhat.com> Subject: Re: [Qemu-devel] [PATCH] io: improve docs for QIOChannelSocket async functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org * Daniel P. Berrange (berrange@redhat.com) wrote: > In the docs for qio_channel_socket_connect_async, > qio_channel_socket_listen_async and > qio_channel_socket_dgram_async, mention that the > SocketAddress parameters are copied, so can be freed > immediately. > > Signed-off-by: Daniel P. Berrange Thanks, Reviewed-by: Dr. David Alan Gilbert > --- > include/io/channel-socket.h | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/include/io/channel-socket.h b/include/io/channel-socket.h > index 810537e..70d06b4 100644 > --- a/include/io/channel-socket.h > +++ b/include/io/channel-socket.h > @@ -105,7 +105,9 @@ int qio_channel_socket_connect_sync(QIOChannelSocket *ioc, > * Attempt to connect to the address @addr. This method > * will run in the background so the caller will regain > * execution control immediately. The function @callback > - * will be invoked on completion or failure. > + * will be invoked on completion or failure. The @addr > + * parameter will be copied, so may be freed as soon > + * as this function returns without waiting for completion. > */ > void qio_channel_socket_connect_async(QIOChannelSocket *ioc, > SocketAddress *addr, > @@ -140,7 +142,9 @@ int qio_channel_socket_listen_sync(QIOChannelSocket *ioc, > * Attempt to listen to the address @addr. This method > * will run in the background so the caller will regain > * execution control immediately. The function @callback > - * will be invoked on completion or failure. > + * will be invoked on completion or failure. The @addr > + * parameter will be copied, so may be freed as soon > + * as this function returns without waiting for completion. > */ > void qio_channel_socket_listen_async(QIOChannelSocket *ioc, > SocketAddress *addr, > @@ -181,6 +185,9 @@ int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc, > * This method will run in the background so the caller > * will regain execution control immediately. The function > * @callback will be invoked on completion or failure. > + * The @localAddr and @remoteAddr parameters will be copied, > + * so may be freed as soon as this function returns without > + * waiting for completion. > */ > void qio_channel_socket_dgram_async(QIOChannelSocket *ioc, > SocketAddress *localAddr, > -- > 2.5.0 > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK