Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#2564 [Patch] improve error reporting in cmciConnect2

Stability
pending-fixed
Dave Heller
sfcc (103)
5
2012-12-04
2012-11-13
Klaus Kämpf
No

If cmciConnect2 fails to load libcimcClientXML.so or libcimcClientSfcbLocal.so, error reporting to the caller doesn't happen.

Reason:
cmciConnect2 returns an error code and message via CMPIStatus* to the caller. The message part is of CMPIString* which needs ConnectionControl.ccEnv in native_new_CMPIString.
If the above mentioned .so files are not accessible, NewCIMCEnv() fails and ConnectionControl.ccEnv cannot be set. The error message returned by NewCIMCEnv cannot be returned to the caller.

The attached patch prints the error messages from NewCIMCEnv to stderr in this case.

Discussion

  • Dave Heller
    Dave Heller
    2012-11-19

    Hi Klaus. I am trying to understand the recreate scenario here. When I remove the libcimcClientXML.so file, SFCC will just segfault at the call to ConnectionControl.ccEnv->ft->newObjectPath.

     
  • Klaus Kämpf
    Klaus Kämpf
    2012-11-30

    If the call from cmciConnect2() to NewCIMCEnv() fails, there is no error reporting.

    The only way for cmciConnect2 to report an error is via the CMPIStatus pointer argument.

    However, CMPIStatus::msg needs a CMPIString pointer, which cannot be constructed without a ccEnv.

     
  • Klaus Kämpf
    Klaus Kämpf
    2012-11-30

    cmciConnect2 does not call ConnectionControl.ccEnv->ft->newObjectPath. If you get a segfault, then the client didn't check the return value from cmciConnect2() properly.

     
  • Dave Heller
    Dave Heller
    2012-12-04

    Committed to git master. Thanks for the bugfix, Klaus.

     
  • Chris Buccella
    Chris Buccella
    2012-12-04

    pushed to git master

     
  • Chris Buccella
    Chris Buccella
    2012-12-04

    • assigned_to: buccella --> hellerda
    • status: open --> pending-fixed