Permalink
Browse files

Match startLogging() and closeLogging() calls

The startLogging and closeLogging calls where unmatched. The former
was called during CIMCEnv creation, the latter during client release.

In case of client connect error, this led to a dangling startLogging
since there was no client to release.

This patch moves the closeLogging() from the client to the CIMCEnv
release.

Signed-off-by: Klaus Kämpf <kkaempf@suse.de>
  • Loading branch information...
1 parent 4f6eecc commit d48556b2c3daf4f3d555deac84c86bea41ca80de @kkaempf committed Apr 21, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 cimcClientSfcbLocal.c
@@ -209,7 +209,6 @@ static CMPIStatus releaseClient(Client * mb)
if (cl->connection) CMRelease(cl->connection);
free(cl);
- closeLogging();
return rc;
}
@@ -1619,6 +1618,7 @@ int localConnect(ClientEnv* ce, CMPIStatus *st)
static void* release(ClientEnv* ce)
{
void *lib=ce->hdl;
+ closeLogging();
CONNECT_LOCK();
if (localConnectCount > 0) localConnectCount -= 1;
if (localConnectCount == 0) {

0 comments on commit d48556b

Please sign in to comment.