Example #1
0
void qdr_error_copy(qdr_error_t *from, pn_condition_t *to)
{
    if (from->name) {
        unsigned char *name = qd_field_iterator_copy(from->name->iterator);
        pn_condition_set_name(to, (char*) name);
        free(name);
    }

    if (from->description) {
        unsigned char *desc = qd_field_iterator_copy(from->description->iterator);
        pn_condition_set_description(to, (char*) desc);
        free(desc);
    }

    if (from->info)
        pn_data_copy(pn_condition_info(to), from->info);
}
Example #2
0
value condition::info() const {
    pn_data_t* t = pn_condition_info(condition_);
    return t ? value(t) : value();
}