fixed ellFree cause malloc and free to be in different win32 dlls
This commit is contained in:
+9
-6
@@ -99,6 +99,9 @@
|
||||
/************************************************************************/
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.107.2.9 2002/03/14 01:13:57 jhill
|
||||
* fixed put notify shutdown during channel delete
|
||||
*
|
||||
* Revision 1.107.2.8 2002/03/08 00:25:08 jhill
|
||||
* fixed bug where the db_put_field in the local event callback stub was supplied
|
||||
* with a destination that was the database field. In situations where the dbAccess
|
||||
@@ -967,7 +970,7 @@ void ca_process_exit()
|
||||
/*
|
||||
* free address list
|
||||
*/
|
||||
ellFree(&piiu->destAddr);
|
||||
ellFreeCA(&piiu->destAddr);
|
||||
|
||||
piiu = (struct ioc_in_use *) piiu->node.next;
|
||||
}
|
||||
@@ -979,10 +982,10 @@ void ca_process_exit()
|
||||
caIOBlockListFree (&ca_static->ca_pend_write_list, NULL, FALSE, ECA_INTERNAL);
|
||||
|
||||
/* remove any pending io event blocks */
|
||||
ellFree(&ca_static->ca_ioeventlist);
|
||||
ellFreeCA(&ca_static->ca_ioeventlist);
|
||||
|
||||
/* remove put convert block free list */
|
||||
ellFree(&ca_static->putCvrtBuf);
|
||||
ellFreeCA(&ca_static->putCvrtBuf);
|
||||
|
||||
/* reclaim sync group resources */
|
||||
ca_sg_shutdown(ca_static);
|
||||
@@ -991,13 +994,13 @@ void ca_process_exit()
|
||||
freeListCleanup(ca_static->ca_ioBlockFreeListPVT);
|
||||
|
||||
/* free select context lists */
|
||||
ellFree(&ca_static->fdInfoFreeList);
|
||||
ellFree(&ca_static->fdInfoList);
|
||||
ellFreeCA(&ca_static->fdInfoFreeList);
|
||||
ellFreeCA(&ca_static->fdInfoList);
|
||||
|
||||
/*
|
||||
* remove IOCs in use
|
||||
*/
|
||||
ellFree(&ca_static->ca_iiuList);
|
||||
ellFreeCA(&ca_static->ca_iiuList);
|
||||
|
||||
/*
|
||||
* free user name string
|
||||
|
||||
+28
-1
@@ -48,6 +48,9 @@
|
||||
/* kernels that support multicast */
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.84.4.3 2002/02/07 18:49:16 jhill
|
||||
* workaround for CONNRESET error from disconnected socket on windows
|
||||
*
|
||||
* Revision 1.84.4.2 2001/03/06 00:32:45 jhill
|
||||
* fixed R3.13 for Linux's new socklen_t
|
||||
*
|
||||
@@ -1495,7 +1498,7 @@ void cac_close_ioc (IIU *piiu)
|
||||
|
||||
piiu->sock_chan = INVALID_SOCKET;
|
||||
|
||||
ellFree (&piiu->destAddr);
|
||||
ellFreeCA (&piiu->destAddr);
|
||||
|
||||
if (chanDisconnectCount) {
|
||||
genLocalExcep (ECA_DISCONN, piiu->host_name_str);
|
||||
@@ -2158,3 +2161,27 @@ int caSendMsgPending()
|
||||
return pending;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* The rumor is that windows croaks if the malloc and free are not in the
|
||||
* same dll.
|
||||
*
|
||||
*****************************************************************************/
|
||||
void ellFreeCA (ELLLIST *pList)
|
||||
{
|
||||
ELLNODE *nnode = pList->node.next;
|
||||
ELLNODE *pnode;
|
||||
|
||||
while (nnode != NULL)
|
||||
{
|
||||
pnode = nnode;
|
||||
nnode = nnode->next;
|
||||
free(pnode);
|
||||
}
|
||||
pList->node.next = NULL;
|
||||
pList->node.previous = NULL;
|
||||
pList->count = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
|
||||
/*
|
||||
* $Log$
|
||||
* Revision 1.74.4.4 2002/03/14 01:13:57 jhill
|
||||
* fixed put notify shutdown during channel delete
|
||||
*
|
||||
* Revision 1.74.4.3 2000/11/30 22:07:51 jhill
|
||||
* changes from Ken Evans
|
||||
*
|
||||
@@ -777,6 +780,7 @@ void cac_create_udp_fd(void);
|
||||
double cac_fetch_poll_period(void);
|
||||
int caSockAddrFromHost(const char *pName, struct sockaddr *paddr);
|
||||
void cac_close_ioc (IIU *piiu);
|
||||
void ellFreeCA (ELLLIST *pList);
|
||||
|
||||
/*
|
||||
* !!KLUDGE!!
|
||||
|
||||
+4
-1
@@ -29,6 +29,9 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* $Log$
|
||||
* Revision 1.26.6.1 1999/07/15 21:02:25 jhill
|
||||
* fixed bug where client disconnects while waiting to send TCP
|
||||
*
|
||||
* Revision 1.26 1997/08/04 23:37:18 jhill
|
||||
* added beacon anomaly flag init/allow ip 255.255.255.255
|
||||
*
|
||||
@@ -117,7 +120,7 @@ void ca_sg_shutdown(struct CA_STATIC *ca_temp)
|
||||
/*
|
||||
* per sync group op
|
||||
*/
|
||||
ellFree (&ca_temp->activeCASGOP);
|
||||
ellFreeCA (&ca_temp->activeCASGOP);
|
||||
freeListCleanup(ca_temp->ca_sgopFreeListPVT);
|
||||
|
||||
UNLOCK;
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* $Log$
|
||||
* Revision 1.39.4.6 2002/03/14 01:13:58 jhill
|
||||
* fixed put notify shutdown during channel delete
|
||||
*
|
||||
* Revision 1.39.4.5 2002/03/13 22:07:58 jhill
|
||||
* improved put notify cleanup when client terminates
|
||||
*
|
||||
@@ -641,12 +644,12 @@ LOCAL int cac_os_depen_exit_tid (struct CA_STATIC *pcas, int tid)
|
||||
status = db_close_events(pcas->ca_evuser);
|
||||
assert(status == OK);
|
||||
|
||||
ellFree(&pcas->ca_lcl_buff_list);
|
||||
ellFreeCA(&pcas->ca_lcl_buff_list);
|
||||
|
||||
/*
|
||||
* remove local chid blocks, paddr blocks, waiting ev blocks
|
||||
*/
|
||||
ellFree(&pcas->ca_local_chidlist);
|
||||
ellFreeCA(&pcas->ca_local_chidlist);
|
||||
freeListCleanup(pcas->ca_dbMonixFreeList);
|
||||
|
||||
/*
|
||||
|
||||
@@ -38,6 +38,30 @@
|
||||
#include "bsdSocketResource.h"
|
||||
#include "addrList.h"
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* The rumor is that windows croaks if the malloc and free are not in the
|
||||
* same dll.
|
||||
*
|
||||
*****************************************************************************/
|
||||
static void ellFreeCAS (ELLLIST *pList)
|
||||
{
|
||||
ELLNODE *nnode = pList->node.next;
|
||||
ELLNODE *pnode;
|
||||
|
||||
while (nnode != NULL)
|
||||
{
|
||||
pnode = nnode;
|
||||
nnode = nnode->next;
|
||||
free(pnode);
|
||||
}
|
||||
pList->node.next = NULL;
|
||||
pList->node.previous = NULL;
|
||||
pList->count = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// casDGIntfIO::casDGIntfIO()
|
||||
//
|
||||
@@ -179,7 +203,7 @@ caStatus casDGIntfIO::init(const caNetAddr &addr, unsigned connectWithThisPortIn
|
||||
ellConcat(&this->beaconAddrList, &BCastAddrList);
|
||||
}
|
||||
else {
|
||||
ellFree(&BCastAddrList);
|
||||
ellFreeCAS(&BCastAddrList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +263,7 @@ casDGIntfIO::~casDGIntfIO()
|
||||
socket_close(this->sock);
|
||||
}
|
||||
|
||||
ellFree(&this->beaconAddrList);
|
||||
ellFreeCAS(&this->beaconAddrList);
|
||||
|
||||
bsdSockRelease();
|
||||
}
|
||||
@@ -530,3 +554,5 @@ void casDGIntfIO::processDG()
|
||||
this->client.processDG(*this,*this->pAltOutIO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user