Re: [RFCv2] cld: replace "if (verbose) { act_log }" with CLD_DEBUG

2009-12-06 Thread Jeff Garzik
On 12/06/2009 07:23 PM, Pete Zaitcev wrote: On Sun, 6 Dec 2009 07:41:05 -0800 Colin McCabe wrote: Move prototypes for common.c functions out of cld_msg.h and into a new header file, common.h. Create a structure that represents the current log level and also the function to use for logging.

Re: XDR print?

2009-12-06 Thread Jeff Garzik
On 12/06/2009 07:39 PM, Colin McCabe wrote: I'm wondering if there's a function that will take a buffer full of XDR data and an xdrproc_t, and print out a human readable version of the data. It seems like an obvious debugging tool, but I can't find a reference to anything like this in the XDR doc

XDR print?

2009-12-06 Thread Colin McCabe
I'm wondering if there's a function that will take a buffer full of XDR data and an xdrproc_t, and print out a human readable version of the data. It seems like an obvious debugging tool, but I can't find a reference to anything like this in the XDR docs. I guess the obvious workaround is to deser

Re: [RFCv2] cld: replace "if (verbose) { act_log }" with CLD_DEBUG

2009-12-06 Thread Pete Zaitcev
On Sun, 6 Dec 2009 07:41:05 -0800 Colin McCabe wrote: > Move prototypes for common.c functions out of cld_msg.h and into a new header > file, common.h. Create a structure that represents the current log level and > also the function to use for logging. > static int sess_send_pkt(struct cldc_se

[RFCv2] cld: replace "if (verbose) { act_log }" with CLD_DEBUG

2009-12-06 Thread Colin McCabe
Move prototypes for common.c functions out of cld_msg.h and into a new header file, common.h. Create a structure that represents the current log level and also the function to use for logging. Create CLD_DEBUG and CLD_LOG macros to print debugging and informational log messages, respectively. CLD_

Re: [RFC] cld: replace "if (verbose) { act_log }" with CLD_DEBUG

2009-12-06 Thread Jeff Garzik
On 12/06/2009 10:28 AM, Colin McCabe wrote: Move prototypes for common.c functions out of cld_msg.h and into a new header file, common.h. Create a structure that represents the current log level and the function to use for logging. Patch lacks common.h... -- To unsubscribe from this list: sen

[RFC] cld: replace "if (verbose) { act_log }" with CLD_DEBUG

2009-12-06 Thread Colin McCabe
Move prototypes for common.c functions out of cld_msg.h and into a new header file, common.h. Create a structure that represents the current log level and the function to use for logging. Create CLD_DEBUG and CLD_LOG macros to print debugging and informational log messages, respectively. CLD_DEBUG

Re: [PATCHv2] cldc: replace CLD_MAX_DATA_SZ with CLD_MAX_MSG_SZ

2009-12-06 Thread Jeff Garzik
On 12/06/2009 09:07 AM, Colin McCabe wrote: CLD_MAX_MSG_SZ is clearly the right constant to use when checking if a message the api user wants to send is too long. Signed-off-by: Colin McCabe --- lib/cldc.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) applied -- To unsub

[PATCHv2] cldc: replace CLD_MAX_DATA_SZ with CLD_MAX_MSG_SZ

2009-12-06 Thread Colin McCabe
CLD_MAX_MSG_SZ is clearly the right constant to use when checking if a message the api user wants to send is too long. Signed-off-by: Colin McCabe --- lib/cldc.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/lib/cldc.c b/lib/cldc.c index 7fe5214..0ab4f19 100644 --

Re: [PATCH] cldc: replace CLD_MAX_DATA_SZ with CLD_MAX_MSG_SZ

2009-12-06 Thread Colin McCabe
D'oh! Resending. C. On Sun, Dec 6, 2009 at 12:46 PM, Jeff Garzik wrote: > On 12/06/2009 07:37 AM, Colin McCabe wrote: >> >> CLD_MAX_MSG_SZ is clearly the right constant to use when checking if a >> message >> the api user wants to send is too long. >> >> I found this while working on the XDR st

Re: [PATCH] cldc: replace CLD_MAX_DATA_SZ with CLD_MAX_MSG_SZ

2009-12-06 Thread Jeff Garzik
On 12/06/2009 07:37 AM, Colin McCabe wrote: CLD_MAX_MSG_SZ is clearly the right constant to use when checking if a message the api user wants to send is too long. I found this while working on the XDR stuff. --- lib/cldc.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) Techn

[PATCH] cldc: replace CLD_MAX_DATA_SZ with CLD_MAX_MSG_SZ

2009-12-06 Thread Colin McCabe
CLD_MAX_MSG_SZ is clearly the right constant to use when checking if a message the api user wants to send is too long. I found this while working on the XDR stuff. --- lib/cldc.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/lib/cldc.c b/lib/cldc.c index 7fe5214..0a