~ubuntu-branches/ubuntu/wily/sblim-sfcb/wily

« back to all changes in this revision

Viewing changes to cimcClientSfcbLocal.c

  • Committer: Bazaar Package Importer
  • Author(s): Guillaume BOTTEX
  • Date: 2010-06-07 11:27:00 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100607112700-xcihh864agv7gigq
Tags: 1.3.8-0ubuntu1
* New upstream release
* Packaging format changed from 1.0 to 3.0 (quilt)
* Add missing man pages for getSchema and genSslCert
* Add missing binary sfcbinst2mof
* flex and unzip added as dependencies, because needed at build time by
  configure

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/*
3
 
 * $Id: cimcClientSfcbLocal.c,v 1.29 2009/03/31 21:29:46 buccella Exp $
 
3
 * $Id: cimcClientSfcbLocal.c,v 1.35 2010/04/07 20:54:10 buccella Exp $
4
4
 *
5
5
 * © Copyright IBM Corp. 2006, 2007
6
6
 *
23
23
#include "cmpidt.h"
24
24
#include "cmpift.h"
25
25
#include "cmpimacs.h"
 
26
#include "mlog.h"
 
27
#include <syslog.h>
26
28
 
27
29
#include "providerMgr.h"
28
30
#include "queryOperation.h"
207
209
  if (cl->connection) CMRelease(cl->connection);
208
210
 
209
211
  free(cl);
 
212
  closeLogging();
210
213
  return rc;
211
214
}
212
215
 
811
814
      if (err == 0) {
812
815
         enm=cpyEnumResponses(&binCtx,resp,l);
813
816
         freeResps(resp,binCtx.pCount);
 
817
         CMRelease(path);
814
818
         _SFCB_RETURN(enm);
815
819
      }
816
820
      if (rc) CIMCSetStatusWithChars(rc, resp[err-1]->rc, 
817
821
                  (char*)resp[err-1]->object[0].data);
 
822
      CMRelease(path);
818
823
      freeResps(resp,binCtx.pCount);
819
824
      _SFCB_RETURN(NULL);
820
825
   }
821
826
   else ctxErrResponse(&binCtx,rc);
822
827
   closeProviderContext(&binCtx);
823
 
    
 
828
 
 
829
   CMRelease(path);
824
830
   _SFCB_RETURN(NULL);
825
831
}       
826
832
        
1216
1222
            CMAddArg(out,(char*)name->hdl,&data.value,data.type);
1217
1223
         }
1218
1224
         if (resp->rvValue) {
 
1225
            /* check method return value for pass-by-reference types */
1219
1226
            if (resp->rv.type==CMPI_chars) {
1220
 
               resp->rv.value.chars=(long)resp->rvEnc.data+(char*)resp;
 
1227
               resp->rv.value.chars=strdup((long)resp->rvEnc.data+(char*)resp);
1221
1228
            }
1222
1229
            else if (resp->rv.type==CMPI_dateTime) {
1223
1230
               resp->rv.value.dateTime=
1643
1650
                         const char * certFile, const char * keyFile,
1644
1651
                         CMPIStatus *rc)
1645
1652
{  
1646
 
   ClientEnc *cc = (ClientEnc*)calloc(1, sizeof(ClientEnc));
 
1653
   ClientEnc *cc;
1647
1654
 
1648
 
   if (rc) rc->rc=0;
 
1655
   if (rc) CMSetStatus(rc, 0);
1649
1656
   
 
1657
   if (localConnect(ce,rc)<0) return NULL;
 
1658
 
 
1659
   cc = (ClientEnc*)calloc(1, sizeof(ClientEnc));
 
1660
 
1650
1661
   cc->enc.hdl          = &cc->data;
1651
1662
   cc->enc.ft           = &clientFt;
1652
1663
 
1666
1677
   cc->certData.certFile = certFile ? strdup(certFile) : NULL;
1667
1678
   cc->certData.keyFile = keyFile ? strdup(keyFile) : NULL;
1668
1679
 
1669
 
   if (localConnect(ce,rc)<0) return NULL;
1670
 
 
1671
1680
   return (Client*)cc;
1672
1681
}
1673
1682
 
1736
1745
    ClientEnv *env = (ClientEnv*)malloc(sizeof(ClientEnv));
1737
1746
    env->hdl=NULL;
1738
1747
    env->ft=&localFT;
 
1748
    // enable logging when called from sfcc
 
1749
    startLogging(LOG_ERR);
1739
1750
    
1740
1751
    return env;
1741
1752
 }