#2564 [Patch] improve error reporting in cmciConnect2

Stability
pending-fixed
sfcc (103)
5
2012-12-04
2012-11-13
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
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks