File 0016-check-result-from-_methProvider.patch of Package sblim-sfcb

From 320252d97c88e90e3e15350209ffdedf1f5331b7 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
Date: Wed, 22 Oct 2008 14:43:19 +0200
Subject: [PATCH] check result from _methProvider

---
 providerMgr.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/providerMgr.c b/providerMgr.c
index b300937..97ec578 100644
--- a/providerMgr.c
+++ b/providerMgr.c
@@ -1414,7 +1414,7 @@ int isChild(const char *ns, const char *parent, const char* child)
 
    irc = _methProvider(&binCtx, &req);
 
-   if (irc) {
+   if (irc == MSG_X_PROVIDER) {
       localInvokeMethod(&binCtx, path, "ischild", in, &out, &rc,0);
       irc=(rc.rc==CMPI_RC_OK);
    }
@@ -1444,7 +1444,7 @@ static int startUpProvider(const char* ns, const char *name)
 
    irc = _methProvider(&binCtx, &req);
 
-   if (irc) {
+   if (irc == MSG_X_PROVIDER) {
       localInvokeMethod(&binCtx, path, "_startup", in, &out, &rc, 1);
       irc=(rc.rc==CMPI_RC_OK);
    }
@@ -1480,7 +1480,7 @@ static UtilList *_getConstClassChildren(const char *ns, const char *cn)
 
    irc = _methProvider(&binCtx, &req);
 
-   if (irc) {
+   if (irc == MSG_X_PROVIDER) {
       data = localInvokeMethod(&binCtx, path, "getchildren", in, &out, &rc, 0);
       if (out) {
          ar = CMGetArg(out, "children", &rc).value.array;
@@ -1522,7 +1522,7 @@ static UtilList *_getAssocClassNames(const char *ns)
    memset(&binCtx,0,sizeof(BinRequestContext));
    irc = _methProvider(&binCtx, &req);
 
-   if (irc) {
+   if (irc == MSG_X_PROVIDER) {
       data = localInvokeMethod(&binCtx, path, "getassocs", in, &out, &rc,0);
       if (out) {
          ar = CMGetArg(out, "assocs", &rc).value.array;
-- 
1.6.0.2

openSUSE Build Service is sponsored by