[PATCHv2] cldc: replace CLD_MAX_DATA_SZ with CLD_MAX_MSG_SZ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <cmccabe@xxxxxxxxxxxxxx>

---
 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

--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux