Announcement

Collapse
No announcement yet.

return of a NULL when running XML stuff

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • return of a NULL when running XML stuff

    When I run this:
    memzero(&xmlReadValueSpec, sizeof(xmlReadValueSpec));
    xmlReadValueSpec.type = XML_READ_VALUE_TYPE__CONFIGURATION;
    xmlReadValueSpec.groupName = "filesystem";
    xmlReadValueSpec.itemName = "filesystem";
    xmlReadValueSpec.optValueName = "size";

    FSTotalSize_ptr = XMLReadValue_malloc(&xmlReadValueSpec);
    snprintf(outBuffer, sizeof(outBuffer), "available char: %s", FSTotalSize_ptr);
    TLOG(TLOG_SEVERITY_DEBUG, outBuffer);
    All I get in return is a NULL.

    any ideas?

  • #2
    This information is in the status record (not the configuration record).
    Change
    xmlReadValueSpec.type = XML_READ_VALUE_TYPE__CONFIGURATION;
    to
    xmlReadValueSpec.type = XML_READ_VALUE_TYPE__STATUS;

    and it should work for you.

    Comment

    Working...
    X