From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39842 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJ4vl-0006J1-0L for qemu-devel@nongnu.org; Thu, 18 Nov 2010 08:53:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJ4vk-0006wc-43 for qemu-devel@nongnu.org; Thu, 18 Nov 2010 08:53:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJ4vj-0006wT-Tb for qemu-devel@nongnu.org; Thu, 18 Nov 2010 08:53:40 -0500 Message-ID: <4CE52FDF.8020500@redhat.com> Date: Thu, 18 Nov 2010 14:53:35 +0100 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC][PATCH v4 01/18] virtagent: add common rpc transport defs References: <1289923320-5638-1-git-send-email-mdroth@linux.vnet.ibm.com> <1289923320-5638-2-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1289923320-5638-2-git-send-email-mdroth@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: aliguori@linux.vnet.ibm.com, ryanh@us.ibm.com, agl@linux.vnet.ibm.com, qemu-devel@nongnu.org, abeekhof@redhat.com On 11/16/10 17:01, Michael Roth wrote: > +#define DEBUG_VA > + > +#ifdef DEBUG_VA > +#define TRACE(msg, ...) do { \ > + fprintf(stderr, "%s:%s():L%d: " msg "\n", \ > + __FILE__, __FUNCTION__, __LINE__, ## __VA_ARGS__); \ > +} while(0) > +#else > +#define TRACE(msg, ...) \ > + do { } while (0) > +#endif > + > +#define LOG(msg, ...) do { \ > + fprintf(stderr, "%s:%s(): " msg "\n", \ > + __FILE__, __FUNCTION__, ## __VA_ARGS__); \ > +} while(0) I am sure I saw those macros in a couple of other places in the tree recently :) > +#define TADDR "127.0.0.1:8080" > +#define URL "http://localhost:8080/RPC2" Rather than relying on hard coded addresses for this, how about moving it to a config file? Cheers, Jes