Github user ted-ross commented on a diff in the pull request:

    https://github.com/apache/qpid-dispatch/pull/59#discussion_r56070842
  
    --- Diff: src/router_core/agent_link.c ---
    @@ -229,3 +242,185 @@ void qdra_link_get_next_CT(qdr_core_t *core, 
qdr_query_t *query)
         //
         qdr_agent_enqueue_response_CT(core, query);
     }
    +
    +
    +static void qdr_manage_write_response_map_CT(qd_composed_field_t *body, 
qdr_link_t *link)
    +{
    +    qd_compose_start_map(body);
    +
    +    for(int i = 0; i < QDR_LINK_COLUMN_COUNT; i++) {
    +        qd_compose_insert_string(body, qdr_link_columns[i]);
    +        qdr_agent_write_column_CT(body, i, link);
    +    }
    +
    +    qd_compose_end_map(body);
    +}
    +
    +
    +static qdr_link_t *qdr_link_find_by_identity(qdr_core_t *core, 
qd_field_iterator_t *identity)
    +{
    +    if (!identity)
    +        return 0;
    +
    +    qdr_link_t *link = DEQ_HEAD(core->open_links);
    +
    +    while(link) {
    +        char id[100];
    +        if (link->identifier) {
    +            snprintf(id, 100, "%ld", link->identifier);
    +            if (qd_field_iterator_equal(identity, (const unsigned char 
*)id))
    +                break;
    +        }
    +        link = DEQ_NEXT(link);
    +    }
    +
    +    return link;
    +
    +}
    +
    +
    +static qdr_link_t *qdr_link_find_by_name(qdr_core_t *core, 
qd_field_iterator_t *name)
    +{
    +    if(!name)
    +        return 0;
    +
    +    qdr_link_t *link = DEQ_HEAD(core->open_links);
    +
    +    while(link) {
    +        if (link->name && qd_field_iterator_equal(name, (const unsigned 
char *)link->name))
    +            break;
    +        link = DEQ_NEXT(link);
    +    }
    +
    +    return link;
    +}
    +
    +
    +/**
    + * The body map containing any attributes that are not applicable for the 
entity being updated
    + * MUST result in a failure response with a statusCode of 400 (Bad 
Request).
    + * TODO - Generalize this function so that all update functions can use it.
    + */
    +static qd_error_t qd_is_update_request_valid(qd_router_entity_type_t  
entity_type,
    --- End diff --
    
    This seems a bit of overkill.  There's only one column that's updatable in 
this entity type.  Why allow all the non-updatable columns?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to