Update of /cvsroot/linux-decnet/latd
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28449
Modified Files:
connection.h connection.cc
Log Message:
Add MAX_REPLIES to connection. I have a feeling that there might sometimes
be more than 4, but the max was actually being put at 3! Oops This could
cause daemon crashes on busy systems.
Thanks to kal...@ci... for this fix.
Index: connection.h
===================================================================
RCS file: /cvsroot/linux-decnet/latd/connection.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** connection.h 23 Jun 2009 11:56:50 -0000 1.34
--- connection.h 25 Jun 2009 07:05:44 -0000 1.35
***************
*** 1,4 ****
/******************************************************************************
! (c) 2000-2003 Christine Caulfield chr...@go...
This program is free software; you can redistribute it and/or modify
--- 1,4 ----
/******************************************************************************
! (c) 2000-2009 Christine Caulfield chr...@go...
This program is free software; you can redistribute it and/or modify
***************
*** 20,23 ****
--- 20,24 ----
typedef enum {REPLY, DATA, CONTINUATION} send_type;
static const unsigned int MAX_SESSIONS = 254;
+ static const unsigned int MAX_REPLIES = 254;
LATConnection(int _num, unsigned char *buf, int len,
Index: connection.cc
===================================================================
RCS file: /cvsroot/linux-decnet/latd/connection.cc,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -r1.76 -r1.77
*** connection.cc 3 Oct 2008 15:49:53 -0000 1.76
--- connection.cc 25 Jun 2009 07:05:45 -0000 1.77
***************
*** 1,4 ****
/******************************************************************************
! (c) 2000-2008 Christine Caulfield chr...@go...
This program is free software; you can redistribute it and/or modify
--- 1,4 ----
/******************************************************************************
! (c) 2000-2009 Christine Caulfield chr...@go...
This program is free software; you can redistribute it and/or modify
***************
*** 143,148 ****
LAT_SessionCmd *msg = (LAT_SessionCmd *)buf;
int num_replies = 0;
! LAT_SlotCmd *reply[4];
! char replybuf[4][256];
bool replyhere = false;
--- 143,148 ----
LAT_SessionCmd *msg = (LAT_SessionCmd *)buf;
int num_replies = 0;
! LAT_SlotCmd *reply[MAX_REPLIES];
! char replybuf[MAX_REPLIES][256];
bool replyhere = false;
***************
*** 152,156 ****
/* Clear out the reply slots and initialise pointers */
memset(replybuf, 0, sizeof(replybuf));
! for (int ri=0; ri<4; ri++)
reply[ri] = (LAT_SlotCmd *)replybuf[ri];
--- 152,156 ----
/* Clear out the reply slots and initialise pointers */
memset(replybuf, 0, sizeof(replybuf));
! for (unsigned int ri=0; ri<MAX_REPLIES; ri++)
reply[ri] = (LAT_SlotCmd *)replybuf[ri];
|