* [PATCH] cldc: replace CLD_MAX_DATA_SZ with CLD_MAX_MSG_SZ
@ 2009-12-06 12:37 Colin McCabe
2009-12-06 20:46 ` Jeff Garzik
0 siblings, 1 reply; 3+ messages in thread
From: Colin McCabe @ 2009-12-06 12:37 UTC (permalink / raw)
To: Project Hail List; +Cc: Pete Zaitcev, Jeff Garzik, 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..0ab4f19 100644
--- a/lib/cldc.c
+++ b/lib/cldc.c
@@ -43,9 +43,6 @@ enum {
CLDC_MSG_RETRY = 5,
CLDC_MSG_REMEMBER = 25,
CLDC_SESS_EXPIRE = 2 * 60,
- CLDC_MAX_DATA_SZ = 256 * 1024,
- CLDC_MAX_DATA_PKT_SZ = 1024,
- CLDC_MAX_DATA_PKTS = (CLDC_MAX_DATA_SZ / CLDC_MAX_DATA_PKT_SZ) + 2,
};
static bool authsign(struct cldc_session *, struct cld_packet *, size_t);
@@ -1174,7 +1171,7 @@ int cldc_put(struct cldc_fh *fh, const struct cldc_call_opts *copts,
struct cldc_msg *msg;
struct cld_msg_put *put;
- if (!data || !data_len || data_len > CLDC_MAX_DATA_SZ)
+ if (!data || !data_len || data_len > CLD_MAX_MSG_SZ)
return -EINVAL;
if (!fh->valid)
--
1.6.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cldc: replace CLD_MAX_DATA_SZ with CLD_MAX_MSG_SZ
2009-12-06 12:37 [PATCH] cldc: replace CLD_MAX_DATA_SZ with CLD_MAX_MSG_SZ Colin McCabe
@ 2009-12-06 20:46 ` Jeff Garzik
2009-12-06 22:03 ` Colin McCabe
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Garzik @ 2009-12-06 20:46 UTC (permalink / raw)
To: Colin McCabe; +Cc: Project Hail List, Pete Zaitcev
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(-)
Technical content 100% correct.
However, I cannot apply, as it's missing the required signed-off-by line
in the patch description.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cldc: replace CLD_MAX_DATA_SZ with CLD_MAX_MSG_SZ
2009-12-06 20:46 ` Jeff Garzik
@ 2009-12-06 22:03 ` Colin McCabe
0 siblings, 0 replies; 3+ messages in thread
From: Colin McCabe @ 2009-12-06 22:03 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Project Hail List, Pete Zaitcev
D'oh!
Resending.
C.
On Sun, Dec 6, 2009 at 12:46 PM, Jeff Garzik <jeff@garzik.org> 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 stuff.
>> ---
>> lib/cldc.c | 5 +----
>> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> Technical content 100% correct.
>
> However, I cannot apply, as it's missing the required signed-off-by line in
> the patch description.
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-06 22:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-06 12:37 [PATCH] cldc: replace CLD_MAX_DATA_SZ with CLD_MAX_MSG_SZ Colin McCabe
2009-12-06 20:46 ` Jeff Garzik
2009-12-06 22:03 ` Colin McCabe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.