|
From: Andre R. <and...@us...> - 2004-10-29 00:12:32
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16550/Frontier/Common/source Modified Files: OpenTransportNetEvents.c Log Message: OTLink and OTLIFO variables must be aligned on 32-bit boundaries. I forgot this when I fixed a compiler warning in the previous revision by changing the type of the flags in the tylistenrecord and tyendpointrecord from UInt32 to UInt8. Some OTLIFO/OTLink elements in these records ended up off-boundary and the app froze hard during startup. Moving the OTLIFO/OTLINK elements to the top of the records should take care of the problem. Index: OpenTransportNetEvents.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/OpenTransportNetEvents.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** OpenTransportNetEvents.c 28 Oct 2004 22:07:07 -0000 1.4 --- OpenTransportNetEvents.c 29 Oct 2004 00:12:20 -0000 1.5 *************** *** 327,334 **** long ctwaiting; } tyepstatsrecord; typedef struct tylistenrecord { EndpointRef ep; - UInt8 stateflags; OTLink validationlink; /* Link into an OT FIFO (not atomic) */ OTLIFO idleEPs; /* Endpoints ready to accept a new incoming connection */ --- 327,337 ---- long ctwaiting; } tyepstatsrecord; + + /* + 2004-10-28 aradke: OTLink and OTLIFO must be aligned on 32-bit boundaries! + */ typedef struct tylistenrecord { EndpointRef ep; OTLink validationlink; /* Link into an OT FIFO (not atomic) */ OTLIFO idleEPs; /* Endpoints ready to accept a new incoming connection */ *************** *** 336,339 **** --- 339,343 ---- OTLIFO readyEPs; /* Ready to be picked up by the worker thread which will spawn a thread to call the daemon */ OTLIFO waitingEPs; /* Endpoints waiting to complete an orderly disconnect */ + UInt8 stateflags; OTConfigurationRef masterconfig; EndpointRecordRef acceptors; |