No subject


Wed Jan 12 20:38:46 GMT 2011


I suspect that problem is in libs/cull/cull_xml.c 
lWriteListXML_ (not lWriteELemXML_).


There is no check before the corresponding fprintf.
Eg,

{
  fprintf(fp, "%s<%s%s>", indent, lGetString(elem, XMLA_Name),
     (is_attr?sge_dstring_get_string(&attr):""));
  fprintf(fp, "%s", lGetString(elem, XMLA_Value));
  lWriteListXML_(lGetList(ep, XMLE_List), nesting_level+1, fp);
  fprintf(fp, "</%s>\n", lGetString(elem, XMLA_Name));
}


Wouldn't it just be a simple case of doing this?

{
  const char* tag = lGetString(elem, XMLA_Name);

  if (tag != NULL && strlen(tag))
  {
    fprintf(fp, "%s<%s%s>", indent, tag,
      (is_attr?sge_dstring_get_string(&attr):""));
    fprintf(fp, "%s", lGetString(elem, XMLA_Value));
  }
  lWriteListXML_(lGetList(ep, XMLE_List), nesting_level+1, fp);

  if (tag != NULL && strlen(tag))
  {
    fprintf(fp, "</%s>\n", tag));
  }
}

------------------------------------------------------
http://gridengine.sunsource.net/ds/viewMessage.do?dsForumId=36&dsMessageId=231149

To unsubscribe from this discussion, e-mail: [issues-unsubscribe at gridengine.sunsource.net].



More information about the gridengine-users mailing list