Hi All,
m_iLibCount is used by ChannelFactory to keep a count of how may HTTP
channel libraries have been loaded. Since there are only two types of
channel associated with HTTP transport, it did not seem unreasonable to set
the limit to 2. m_iLibCount should only change when LoadChannelLibrary is
called. This should only be called by HTTPTransport when a new HTTP DLL or
HTTP SSL DLL name is passed to the setTransportProperty method in
HTTPTransport. This method should only need to be called once or at most
twice to set/load the DLL associated with unsecure and secure channel
transports. If the client/server continually tries to set the name of the
libraries that deal with the HTTP channel requests, then m_iLibCount will
indeed max at 2 and no more alterations will be possible. I have changed
the code to allow the user to keep on loading the same DLLs as often as
they require (although what purpose this serves I not entirely sure).
Regards,
Fred Preston.
Samisa Abeysinghe
<samisa.abeysinghe To: Apache AXIS C
Developers List <[email protected]>
@gmail.com> cc:
Subject: m_iLibCount in
ChannelFactory class
25/01/05 08:11
Please respond to
"Apache AXIS C
Developers List"
Hi,
m_iLibCount in ChannelFactory class hit the celing value
ChannelFactory_MaxListSize (which is 2 at the moment) during the first
call to ChannelFactory::LoadChannelLibrary().
Then m_iLibCount stays at 2 and the subsequest calls to
ChannelFactory::LoadChannelLibrary() tries to access invalid memory on
line:
m_pChannel[m_iLibCount] = pChannel; (in other words tries to access
m_pChannel[2] which is out of array given that array size is 2.
I ran into this while running the memory profiler.
I think this is a bug.
I guess we have to correct it by adding an else clause to:
if( m_iLibCount < ChannelFactory_MaxListSize)
{
m_iLibCount++;
}
else
{
m_iLibCount = 0; // hit the celing, next load attempt need to
reload form start
}
Any comments please.
Thanks,
Samisa...