Ejemplo n.º 1
0
void qdr_terminus_copy(qdr_terminus_t *from, pn_terminus_t *to)
{
    if (!from)
        return;

    if (from->address) {
        qd_address_iterator_reset_view(from->address->iterator, ITER_VIEW_ALL);
        unsigned char *addr = qd_field_iterator_copy(from->address->iterator);
        pn_terminus_set_address(to, (char*) addr);
        free(addr);
    }

    pn_terminus_set_durability(to,        from->durability);
    pn_terminus_set_expiry_policy(to,     from->expiry_policy);
    pn_terminus_set_timeout(to,           from->timeout);
    pn_terminus_set_dynamic(to,           from->dynamic);
    pn_terminus_set_distribution_mode(to, from->distribution_mode);

    pn_data_copy(pn_terminus_properties(to),   from->properties);
    pn_data_copy(pn_terminus_filter(to),       from->filter);
    pn_data_copy(pn_terminus_outcomes(to),     from->outcomes);
    pn_data_copy(pn_terminus_capabilities(to), from->capabilities);
}
Ejemplo n.º 2
0
void terminus::timeout(uint32_t seconds) {
    pn_terminus_set_timeout(object_, seconds);
}