Skip to content

Commit

Permalink
apply clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek committed Oct 27, 2022
1 parent 3bbaa9e commit b8fa10a
Show file tree
Hide file tree
Showing 17 changed files with 1,062 additions and 698 deletions.
1 change: 0 additions & 1 deletion include/qpid/dispatch/compose.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
/** A linked list of buffers composing a sequence of AMQP data objects. */
typedef struct qd_composed_field_t qd_composed_field_t;


/**@file
* Composing AMQP data trees.
*
Expand Down
3 changes: 0 additions & 3 deletions include/qpid/dispatch/discriminator.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
* under the License.
*/



// QD_DISCRIMINATOR_SIZE includes null terminator byte. The
// strlen() of a discriminator will be 15

Expand All @@ -33,5 +31,4 @@
*/
void qd_generate_discriminator(char *string);


#endif
1 change: 0 additions & 1 deletion include/qpid/dispatch/protocol_adaptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ qdr_protocol_adaptor_t *qdr_protocol_adaptor(qdr_core_t *core,
qdr_connection_close_t conn_close,
qdr_connection_trace_t conn_trace);


/**
* qdr_protocol_adaptor_free
*
Expand Down
11 changes: 5 additions & 6 deletions include/qpid/dispatch/router_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ qd_dispatch_t *qdr_core_dispatch(qdr_core_t *core);
*/
void qdr_process_tick(qdr_core_t *core);


/**
* Return true iff the test hooks option is enabled for this process.
*
Expand Down Expand Up @@ -101,11 +100,11 @@ typedef void (*qdr_set_mobile_seq_t) (void *context, int router_maskbit, uint
typedef void (*qdr_set_my_mobile_seq_t) (void *context, uint64_t mobile_seq);
typedef void (*qdr_link_lost_t) (void *context, int link_maskbit);

void qdr_core_route_table_handlers(qdr_core_t *core,
void *context,
qdr_set_mobile_seq_t set_mobile_seq,
qdr_set_my_mobile_seq_t set_my_mobile_seq,
qdr_link_lost_t link_lost);
void qdr_core_route_table_handlers(qdr_core_t *core,
void *context,
qdr_set_mobile_seq_t set_mobile_seq,
qdr_set_my_mobile_seq_t set_my_mobile_seq,
qdr_link_lost_t link_lost);

/**
******************************************************************************
Expand Down
4 changes: 0 additions & 4 deletions include/qpid/dispatch/vanflow.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ typedef enum vflow_attribute {
#define VALID_STRING_ATTRS 0x00000005787ffe00
#define VALID_TRACE_ATTRS 0x0000000080000000


/**
* vflow_start_record
*
Expand Down Expand Up @@ -139,7 +138,6 @@ void vflow_end_record(vflow_record_t *record);
*/
void vflow_serialize_identity(const vflow_record_t *record, qd_composed_field_t *field);


/**
* vflow_set_ref_from_record
*
Expand All @@ -151,7 +149,6 @@ void vflow_serialize_identity(const vflow_record_t *record, qd_composed_field_t
*/
void vflow_set_ref_from_record(vflow_record_t *record, vflow_attribute_t attribute_type, vflow_record_t *referenced_record);


/**
* vflow_set_ref_from_parsed
*
Expand Down Expand Up @@ -185,7 +182,6 @@ void vflow_set_string(vflow_record_t *record, vflow_attribute_t attribute_type,
*/
void vflow_set_uint64(vflow_record_t *record, vflow_attribute_t attribute_type, uint64_t value);


/**
* vflow_set_trace
*
Expand Down
1,531 changes: 969 additions & 562 deletions python/skupper_router/management/skrouter.json

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions src/policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,6 @@ qd_parse_tree_t * qd_policy_parse_tree(const char *config_spec)
return tree;
}


//
// Functions related to authenticated connection denial.
// An AMQP Open has been received over some connection.
Expand Down Expand Up @@ -451,7 +450,6 @@ bool qd_policy_lookup_vhost_alias(
return res;
}


/** Look up user/host/vhost in python vhost database and give the AMQP Open
* a go-no_go decision.
* * Return false if the mechanics of calling python fails or if name buf is blank.
Expand Down Expand Up @@ -1363,8 +1361,8 @@ char * qd_policy_host_pattern_lookup(qd_policy_t *policy, const char *hostPatter
if (!matched) {
payload = 0;
}
qd_log(policy->log_source, QD_LOG_TRACE, "vhost hostname pattern '%s' lookup returned '%s'",
hostPattern, (payload ? (char *)payload : "null"));
qd_log(policy->log_source, QD_LOG_TRACE, "vhost hostname pattern '%s' lookup returned '%s'", hostPattern,
(payload ? (char *) payload : "null"));
return payload;
}

Expand Down
2 changes: 0 additions & 2 deletions src/policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ qd_error_t qd_policy_c_counts_refresh(qd_policy_denial_counts_t* dc, qd_entity_t
**/
bool qd_policy_socket_accept(qd_policy_t *context, const char *hostname);


/** Record a closing connection.
* A server listener is closing a socket.
* Release the counted connection against provisioned limits
Expand Down Expand Up @@ -187,7 +186,6 @@ void qd_policy_amqp_open(qd_connection_t *conn);
**/
void qd_policy_amqp_open_connector(qd_connection_t *conn);


/** Dispose of policy settings
*
* @param settings the settings to be destroyed
Expand Down
3 changes: 0 additions & 3 deletions src/policy_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ void qd_policy_private_deny_amqp_connection(pn_connection_t *conn, const char *c
*/
void qd_policy_deny_amqp_session(pn_session_t *ssn, qd_connection_t *qd_conn);


/** Internal function to deny an amqp link
* The link is closed and the denial is logged but not counted.
* @param[in] link proton link being closed
Expand All @@ -50,7 +49,6 @@ void qd_policy_deny_amqp_session(pn_session_t *ssn, qd_connection_t *qd_conn);
*/
void _qd_policy_deny_amqp_link(pn_link_t *link, qd_connection_t *qd_conn, const char *condition);


/** Internal function to deny a sender amqp link
* The link is closed and the denial is logged but not counted.
* @param[in] link proton link to close
Expand All @@ -59,7 +57,6 @@ void _qd_policy_deny_amqp_link(pn_link_t *link, qd_connection_t *qd_conn, const
*/
void _qd_policy_deny_amqp_sender_link(pn_link_t *pn_link, qd_connection_t *qd_conn, const char *condition);


/** Internal function to deny a receiver amqp link
* The link is closed and the denial is logged but not counted.
* @param[in] link proton link to close
Expand Down
26 changes: 10 additions & 16 deletions src/router_core/modules/edge_router/addr_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,22 +475,16 @@ qcm_edge_addr_proxy_t *qcm_edge_addr_proxy(qdr_core_t *core)
//
// Subscribe to the core events we'll need to drive this component
//
ap->event_sub = qdrc_event_subscribe_CT(core,
QDRC_EVENT_CONN_EDGE_ESTABLISHED
| QDRC_EVENT_CONN_EDGE_LOST
| QDRC_EVENT_ADDR_ADDED_LOCAL_DEST
| QDRC_EVENT_ADDR_REMOVED_LOCAL_DEST
| QDRC_EVENT_ADDR_BECAME_SOURCE
| QDRC_EVENT_ADDR_NO_LONGER_SOURCE
| QDRC_EVENT_ADDR_WATCH_ON
| QDRC_EVENT_ADDR_WATCH_OFF
| QDRC_EVENT_LINK_IN_DETACHED
| QDRC_EVENT_LINK_OUT_DETACHED,
on_conn_event,
on_link_event,
on_addr_event,
0,
ap);
ap->event_sub = qdrc_event_subscribe_CT(
core,
QDRC_EVENT_CONN_EDGE_ESTABLISHED | QDRC_EVENT_CONN_EDGE_LOST | QDRC_EVENT_ADDR_ADDED_LOCAL_DEST | QDRC_EVENT_ADDR_REMOVED_LOCAL_DEST
| QDRC_EVENT_ADDR_BECAME_SOURCE | QDRC_EVENT_ADDR_NO_LONGER_SOURCE | QDRC_EVENT_ADDR_WATCH_ON | QDRC_EVENT_ADDR_WATCH_OFF
| QDRC_EVENT_LINK_IN_DETACHED | QDRC_EVENT_LINK_OUT_DETACHED,
on_conn_event,
on_link_event,
on_addr_event,
0,
ap);

core->edge_conn_addr = qcm_edge_conn_addr;
core->edge_context = ap;
Expand Down
11 changes: 5 additions & 6 deletions src/router_core/route_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,11 @@ void qdr_core_mobile_seq_advanced(qdr_core_t *core, int router_maskbit)
qdr_action_enqueue(core, action);
}


void qdr_core_route_table_handlers(qdr_core_t *core,
void *context,
qdr_set_mobile_seq_t set_mobile_seq,
qdr_set_my_mobile_seq_t set_my_mobile_seq,
qdr_link_lost_t link_lost)
void qdr_core_route_table_handlers(qdr_core_t *core,
void *context,
qdr_set_mobile_seq_t set_mobile_seq,
qdr_set_my_mobile_seq_t set_my_mobile_seq,
qdr_link_lost_t link_lost)
{
core->rt_context = context;
core->rt_set_mobile_seq = set_mobile_seq;
Expand Down
12 changes: 5 additions & 7 deletions src/router_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ static void qdr_node_connect_deliveries(qd_link_t *link, qdr_delivery_t *qdlv, p
pn_delivery_set_context(pdlv, ref);
qdr_delivery_set_context(qdlv, pdlv);
qdr_delivery_incref(qdlv, "referenced by a pn_delivery");

}


Expand Down Expand Up @@ -1651,12 +1650,11 @@ static void CORE_connection_activate(void *context, qdr_connection_t *conn)
sys_mutex_unlock(qd_server_get_activation_lock(router->qd->server));
}


static void CORE_link_first_attach(void *context,
qdr_connection_t *conn,
qdr_link_t *link,
qdr_terminus_t *source,
qdr_terminus_t *target,
static void CORE_link_first_attach(void *context,
qdr_connection_t *conn,
qdr_link_t *link,
qdr_terminus_t *source,
qdr_terminus_t *target,
qd_session_class_t ssn_class)
{
qd_router_t *router = (qd_router_t*) context;
Expand Down
14 changes: 0 additions & 14 deletions src/vanflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ static uint64_t _now_in_usec(void)
return (uint64_t) tv.tv_usec + (uint64_t) (1000000L * (uint64_t) tv.tv_sec);
}


/**
* @brief Find either the existing attribute record or the insertion point for a new attribute.
*
Expand Down Expand Up @@ -209,7 +208,6 @@ static vflow_attribute_data_t* _vflow_find_attribute(vflow_record_t *record, vfl
return 0;
}


/**
* @brief Assign a unique identity for a locally-sourced record.
*
Expand Down Expand Up @@ -281,7 +279,6 @@ static void _vflow_compose_attribute(qd_composed_field_t *field, const vflow_att
}
}


/**
* @brief Work handler for vflow_start_record
*
Expand Down Expand Up @@ -356,7 +353,6 @@ static void _vflow_start_record_TH(vflow_work_t *work, bool discard)
}
}


/**
* @brief Work handler for vflow_end_record
*
Expand Down Expand Up @@ -406,7 +402,6 @@ static void _vflow_end_record_TH(vflow_work_t *work, bool discard)
}
}


/**
* @brief Work handler for vflow_set_string
*
Expand Down Expand Up @@ -453,7 +448,6 @@ static void _vflow_set_string_TH(vflow_work_t *work, bool discard)
}
}


/**
* @brief Work handler for vflow_set_int
*
Expand Down Expand Up @@ -498,7 +492,6 @@ static void _vflow_set_int_TH(vflow_work_t *work, bool discard)
}
}


/**
* @brief Allocate a work object pre-loaded with a handler.
*
Expand All @@ -513,7 +506,6 @@ static vflow_work_t *_vflow_work(vflow_work_handler_t handler)
return work;
}


/**
* @brief Post work for processing in the vflow thread
*
Expand Down Expand Up @@ -573,7 +565,6 @@ static void _vflow_create_router_record(void)
vflow_set_string(router, VFLOW_ATTRIBUTE_BUILD_VERSION, QPID_DISPATCH_VERSION);
}


/**
* @brief Recursively free the given record and all of its children
*
Expand Down Expand Up @@ -702,7 +693,6 @@ static const char *_vflow_attribute_name(const vflow_attribute_data_t *data)
return "UNKNOWN";
}


/**
* @brief Extract the value of a record identity from its serialized form in an iterator
*
Expand Down Expand Up @@ -860,7 +850,6 @@ static void _vflow_emit_unflushed_as_events_TH(qdr_core_t *core)

}


/**
* @brief Emit all of the unflushed records
*
Expand Down Expand Up @@ -1260,7 +1249,6 @@ static void _vflow_on_all_address_watch(void *context,
_vflow_post_work(work);
}


/**
* @brief Handler for changes in reachability for this router's event multicast address.
* This address is used to send the log records to collectors in the network.
Expand Down Expand Up @@ -1519,7 +1507,6 @@ static void _vflow_init_address_watch_TH(vflow_work_t *work, bool discard)
}
}


/**
* @brief Module initializer
*
Expand Down Expand Up @@ -1584,7 +1571,6 @@ static void _vflow_init(qdr_core_t *core, void **adaptor_context)
qd_timer_schedule(state->flush_timer, initial_flush_interval_msec);
}


/**
* @brief Module finalizer
*
Expand Down
Loading

0 comments on commit b8fa10a

Please sign in to comment.