* FORMAT pub_handler.c
@@ -63,8 +63,10 @@ foreach_client(
}
while (tn != NULL) {
- if (0 == strcmp(tn->it->topic_filter.body,
- pub_work->pub_packet->variable_header.publish.topic_name.body)) {
+ if (0 ==
+ strcmp(tn->it->topic_filter.body,
+ pub_work->pub_packet->variable_header.publish
+ .topic_name.body)) {
sub_qos = tn->it->qos;
break;
}
@@ -109,8 +111,11 @@ handle_pub(nano_work *work, struct pipe_content *pipe_ct)
void **cli_ctx_list = NULL;
size_t msg_cnt = 0;
if (work->pub_packet->fixed_header.qos > 0) {
- cli_ctx_list = dbtree_find_clients_and_cache_msg(work->db,
- work->pub_packet->variable_header.publish.topic_name.body, work->msg, &msg_cnt);
+ cli_ctx_list =
+ dbtree_find_clients_and_cache_msg(work->db,
+ work->pub_packet->variable_header.publish
+ .topic_name.body,
+ work->msg, &msg_cnt);
// Note. Why do we clone msg (msg_cnt-1) times?
// It's because that the refcnt of msg is 1, when
// plus (msg_cnt-1), equals (msg_cnt), and it means
@@ -119,8 +124,11 @@ handle_pub(nano_work *work, struct pipe_content *pipe_ct)
nng_msg_clone(work->msg);
}
} else {
- cli_ctx_list = dbtree_find_clients_and_cache_msg(work->db,
- work->pub_packet->variable_header.publish.topic_name.body, NULL, &msg_cnt);
+ cli_ctx_list =
+ dbtree_find_clients_and_cache_msg(work->db,
+ work->pub_packet->variable_header.publish
+ .topic_name.body,
+ NULL, &msg_cnt);
}
if (cli_ctx_list != NULL) {
