~ubuntu-branches/ubuntu/utopic/sblim-sfcc/utopic-proposed

« back to all changes in this revision

Viewing changes to backend/cimxml/property.c

  • Committer: Package Import Robot
  • Author(s): Logan Rosen
  • Date: 2012-11-15 11:49:36 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20121115114936-53syr7flsjo21gw3
Tags: 2.2.4-0ubuntu1
* New upstream release.
* Add debian/watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
  http://www.opensource.org/licenses/eclipse-1.0.php
20
20
 
21
21
  \author Frank Scheffler
22
 
  $Revision: 1.4 $
 
22
  $Revision: 1.5 $
23
23
*/
24
24
 
25
25
#include <stdio.h>
44
44
static CMPIData __convert2CMPIData ( struct native_property * prop,
45
45
                                     CMPIString ** propname )
46
46
{
47
 
        CMPIData result;
 
47
        CMPIData result = { 0, CMPI_nullValue, {0} };
48
48
 
49
49
        if ( prop != NULL ) {
50
50
                result.type  = prop->type;
56
56
                                                             NULL );
57
57
                }
58
58
 
59
 
        } else {
60
 
                result.state = CMPI_nullValue;
61
 
        }
 
59
        } 
62
60
 
63
61
        return result;
64
62
}
218
216
        struct native_property * next;
219
217
        for ( ; prop; prop = next ) {
220
218
                free ( prop->name );
221
 
                native_release_CMPIValue ( prop->type, &prop->value );
 
219
                if(prop->state != CMPI_nullValue)
 
220
                        native_release_CMPIValue ( prop->type, &prop->value );
222
221
                qualifierFT.release(prop->qualifiers);
223
222
                next=prop->next;
224
223
                free ( prop );
244
243
        result->name  = strdup ( prop->name );
245
244
        result->type  = prop->type;
246
245
        result->state = prop->state;
247
 
        result->value = native_clone_CMPIValue ( prop->type,
248
 
                                                 &prop->value,
249
 
                                                 &tmp );
250
 
 
251
 
        if ( tmp.rc != CMPI_RC_OK ) {
 
246
        if (prop->state != CMPI_nullValue
 
247
            && prop->state != CMPI_badValue) {
 
248
          result->value = native_clone_CMPIValue ( prop->type,
 
249
                                                   &prop->value,
 
250
                                                   &tmp );
 
251
          if ( tmp.rc != CMPI_RC_OK ) {
252
252
 
253
253
                result->state = CMPI_nullValue;
254
 
        }
255
 
 
 
254
          }
 
255
        }
256
256
        result->qualifiers    = qualifierFT.clone ( prop->qualifiers, rc );
257
257
        
258
258
        result->next  = __clone ( prop->next, rc );