]> git.evergreen-ils.org Git - OpenSRF.git/commit
Patch from Scott McKellar:
authormiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 12 Jun 2007 01:05:53 +0000 (01:05 +0000)
committermiker <miker@9efc2488-bf62-4759-914b-345cdb29e865>
Tue, 12 Jun 2007 01:05:53 +0000 (01:05 +0000)
commitfbcf616c036124175afad7f405e07b37df0b55b4
tree813c77ce94fca4afe2c47a67d7be72fec52af819
parentd597348e26af3eea27b7e2b1da5c2cd54d09c259
Patch from Scott McKellar:

1. I made __osrfChatXMLErrorOcurred and __osrfChatClientSentDisconnect
static, and removed the leading underscores from their names.  No other
source files refer to them.

2. In osrfNewChatServer() I explicitly initialize the port member to
zero -- which is already happening implicitly due to the memset() in
safe_malloc().

3. Also in osrfNewChatServer(): the existing code populates the secret
member only if the secret parameter is not NULL, and leaves it
uninitialized otherwise.  However if the secret parameter were NULL
we would have already performed an early exit.  I populate the secret
member unconditionally, just as we do with the domain member.  I also
moved this assignment up with the other assignments, for a more
readable flow.

4. In osrfChatServerFree(), the existing code leaves several memory
references dangling, without freeing them.  I added code to free the
domain member, the deadNodes member, and finally the osrfChatServer
itself.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@936 9efc2488-bf62-4759-914b-345cdb29e865
src/jserver/osrf_chat.c