88 - amq_console_agent crashes

Reported by pieterhpieterh (1282985215|%O ago)

Here is a patch for the reply_ok method (starting around 2857):

...
entry = s_lookup_object (self, object_id);

cml_item = ipr_xml_new (NULL, "cml", NULL);
ipr_xml_attr_set (cml_item, "version", "1.0");
ipr_xml_attr_set (cml_item, "xmlns", "http://www.openamq.org/schema/cml");

if (entry) {
    cur_item = ipr_xml_new (cml_item, name, NULL);
    ipr_xml_attr_set (cur_item, "class",  entry->class_ref->name);
    ipr_xml_attr_set (cur_item, "object", icl_shortstr_fmt (strvalue, "%d", object_id));
    ipr_xml_attr_set (cur_item, "status", "ok");
    if (notice)
        ipr_xml_attr_set (cur_item, "notice", notice);

    if (fields) {
        field = asl_field_list_first (fields);
        while (field) {
            sub_item = ipr_xml_new (cur_item, "field", NULL);
            ipr_xml_attr_set (sub_item, "name", field->name);
            val_item = ipr_xml_new (sub_item, NULL, asl_field_string (field));
            ipr_xml_unlink (&val_item);
            ipr_xml_unlink (&sub_item);
            field = asl_field_list_next (&field);
        }
    }
}
s_reply_xml (request, cml_item);
...

Attachments:

No files attached to this page.

Comments

Add a New Comment

Edit | Files | Tags | Print

rating: 0+x

Who's following this issue?

pieterhpieterh
martin_sustrikmartin_sustrik
CybariteCybarite
Watch: site | category | page

Submitted by pieterhpieterh

Use one of these tags to say what kind of issue it is:

  • issue - a fault in the software or the packaging or the documentation.
  • change - a change or feature request.

Use one of these tags to say what state the issue is in:

  • open - a new, open issue.
  • closed - issue has been closed.
  • rejected - the issue has been rejected.

Use one of these tags to say how urgent the issue is:

  • fatal - the issue is stopping all work.
  • urgent - it's urgent.

All open

Most recent

Page tags: closed