From patchwork Wed Feb 3 13:48:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 8203351 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 41FD19F3CD for ; Wed, 3 Feb 2016 13:49:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4417201C7 for ; Wed, 3 Feb 2016 13:49:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E0FDE20166 for ; Wed, 3 Feb 2016 13:49:07 +0000 (UTC) Received: from localhost ([::1]:35065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQxnv-0006eX-Ac for patchwork-qemu-devel@patchwork.kernel.org; Wed, 03 Feb 2016 08:49:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQxno-0006eD-BL for qemu-devel@nongnu.org; Wed, 03 Feb 2016 08:49:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQxnl-0005oD-66 for qemu-devel@nongnu.org; Wed, 03 Feb 2016 08:49:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQxnl-0005o7-0f for qemu-devel@nongnu.org; Wed, 03 Feb 2016 08:48:57 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 76FA614CAB3 for ; Wed, 3 Feb 2016 13:48:56 +0000 (UTC) Received: from t530wlan.home.berrange.com.com (vpn1-5-58.ams2.redhat.com [10.36.5.58]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u13DmtVb030820; Wed, 3 Feb 2016 08:48:55 -0500 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Wed, 3 Feb 2016 13:48:51 +0000 Message-Id: <1454507331-30729-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: "Dr. David Alan Gilbert" Subject: [Qemu-devel] [PATCH] io: improve docs for QIOChannelSocket async functions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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,