fix format

This commit is contained in:
Nick Hainke 2021-02-01 20:08:48 +01:00
parent ad09c4303a
commit c9b120fc2f

View file

@ -56,9 +56,9 @@ struct neighbour_list_entry {
// Sends a babel info message on ubus socket. // Sends a babel info message on ubus socket.
static int babeld_ubus_babeld_info(struct ubus_context *ctx_local, static int babeld_ubus_babeld_info(struct ubus_context *ctx_local,
struct ubus_object *obj, struct ubus_object *obj,
struct ubus_request_data *req, struct ubus_request_data *req,
const char *method, struct blob_attr *msg) { const char *method, struct blob_attr *msg) {
struct blob_buf b = {0}; struct blob_buf b = {0};
void *prefix; void *prefix;
char host[64]; char host[64];
@ -89,11 +89,12 @@ static void babeld_add_xroute_buf(struct xroute *xroute, struct blob_buf *b) {
blobmsg_close_table(b, prefix); blobmsg_close_table(b, prefix);
} }
// Sends an exported routes message on ubus socket, splitting apart IPv4 and IPv6 routes. // Sends an exported routes message on ubus socket, splitting apart IPv4 and
// IPv6 routes.
static int babeld_ubus_get_xroutes(struct ubus_context *ctx_local, static int babeld_ubus_get_xroutes(struct ubus_context *ctx_local,
struct ubus_object *obj, struct ubus_object *obj,
struct ubus_request_data *req, struct ubus_request_data *req,
const char *method, struct blob_attr *msg) { const char *method, struct blob_attr *msg) {
struct blob_buf b = {0}; struct blob_buf b = {0};
struct xroute_stream *xroutes; struct xroute_stream *xroutes;
struct xroute_list_entry *cur, *tmp; struct xroute_list_entry *cur, *tmp;
@ -191,11 +192,12 @@ static void babeld_add_route_buf(struct babel_route *route,
blobmsg_close_table(b, prefix); blobmsg_close_table(b, prefix);
} }
// Sends received routes message on ubus socket, splitting apart IPv4 and IPv6 routes. // Sends received routes message on ubus socket, splitting apart IPv4 and IPv6
// routes.
static int babeld_ubus_get_routes(struct ubus_context *ctx_local, static int babeld_ubus_get_routes(struct ubus_context *ctx_local,
struct ubus_object *obj, struct ubus_object *obj,
struct ubus_request_data *req, struct ubus_request_data *req,
const char *method, struct blob_attr *msg) { const char *method, struct blob_attr *msg) {
struct blob_buf b = {0}; struct blob_buf b = {0};
struct route_stream *routes; struct route_stream *routes;
struct route_list_entry *cur, *tmp; struct route_list_entry *cur, *tmp;
@ -265,12 +267,13 @@ static void babeld_add_neighbour_buf(struct neighbour *neigh,
blobmsg_close_table(b, neighbour); blobmsg_close_table(b, neighbour);
} }
// Sends neighbours message on ubus socket, splitting apart IPv4 and IPv6 neighbours. // Sends neighbours message on ubus socket, splitting apart IPv4 and IPv6
// neighbours.
static int babeld_ubus_get_neighbours(struct ubus_context *ctx_local, static int babeld_ubus_get_neighbours(struct ubus_context *ctx_local,
struct ubus_object *obj, struct ubus_object *obj,
struct ubus_request_data *req, struct ubus_request_data *req,
const char *method, const char *method,
struct blob_attr *msg) { struct blob_attr *msg) {
struct blob_buf b = {0}; struct blob_buf b = {0};
struct neighbour *neigh; struct neighbour *neigh;
struct neighbour_list_entry *cur, *tmp; struct neighbour_list_entry *cur, *tmp;
@ -384,7 +387,8 @@ void ubus_notify_route(struct babel_route *route, int kind) {
void ubus_notify_xroute(struct xroute *xroute, int kind) { void ubus_notify_xroute(struct xroute *xroute, int kind) {
struct blob_buf b = {0}; struct blob_buf b = {0};
char method[50]; // possible methods are xroute.change, xroute.add, xroute.flush char method[50]; // possible methods are xroute.change, xroute.add,
// xroute.flush
if (!babeld_object.has_subscribers) if (!babeld_object.has_subscribers)
return; return;