Skip to content

Commit 6e44679

Browse files
CTCE fixes for Issue #369
The 2 problems identified in Issue #369 for CTCE configurations are now corrected : 1. The "rport" parameter is now always taken into account when matching incoming CTCE connections, and no longer ignored when "rdevnum" is specified. 2. The "rdevnum" when specified as "=" was not incremented correctly when the "ldevnum.n" format was used to specify "n" multiple CTCE devices.
1 parent 20d388b commit 6e44679

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2127,7 +2127,7 @@ int parse_and_attach_devices(const char *sdevnum,
21272127
orig_newargv[j]=newargv[j]=resolve_symbol_string(addargv[j]);
21282128
}
21292129
/* Build the device configuration block */
2130-
rc=attach_device(dnd.lcss, devnum, sdevtype, addargc, newargv, numconfdev);
2130+
rc=attach_device(dnd.lcss, devnum, sdevtype, addargc, newargv, devnum - da[i].cuu1 + 1);
21312131
for(j=0;j<addargc;j++)
21322132
{
21332133
free(orig_newargv[j]);

ctcadpt.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -2041,6 +2041,7 @@ static int CTCE_Init( DEVBLK *dev, int argc, char *argv[] )
20412041
CTCX_DEVNUM( dev ), dev->ctce_rccuu );
20422042
return -1;
20432043
}
2044+
dev->ctce_rccuu += dev->numconfdev - 1;
20442045
}
20452046

20462047
// Remote CCUU addresses < 256 are not supported, but such values
@@ -2329,8 +2330,9 @@ static void* CTCE_ListenThread( void* argp )
23292330
&& dev->allocated
23302331
&& dev->ctctype == CTC_CTCE
23312332
&& dev->ctce_ipaddr.s_addr == parm_listen.addr.sin_addr.s_addr
2333+
&& dev->ctce_rport == pSokBuf->ctce_lport
23322334
&& ( 0
2333-
|| ( ( dev->ctce_rccuu == 0 ) && ( dev->ctce_rport == pSokBuf->ctce_lport ) )
2335+
|| ( dev->ctce_rccuu == 0 )
23342336
|| ( ( dev->ctce_rccuu != 0 ) && ( dev->ctce_rccuu == pSokBuf->devnum ) )
23352337
)
23362338
)

0 commit comments

Comments
 (0)