From c9b120fc2f5226c9aecdc4fecdf5973678a24803 Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Mon, 1 Feb 2021 20:08:48 +0100 Subject: [PATCH] fix format --- babeld/src/ubus.c | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/babeld/src/ubus.c b/babeld/src/ubus.c index b053dd5..c97ee0a 100644 --- a/babeld/src/ubus.c +++ b/babeld/src/ubus.c @@ -56,9 +56,9 @@ struct neighbour_list_entry { // Sends a babel info message on ubus socket. static int babeld_ubus_babeld_info(struct ubus_context *ctx_local, - struct ubus_object *obj, - struct ubus_request_data *req, - const char *method, struct blob_attr *msg) { + struct ubus_object *obj, + struct ubus_request_data *req, + const char *method, struct blob_attr *msg) { struct blob_buf b = {0}; void *prefix; 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); } -// 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, - struct ubus_object *obj, - struct ubus_request_data *req, - const char *method, struct blob_attr *msg) { + struct ubus_object *obj, + struct ubus_request_data *req, + const char *method, struct blob_attr *msg) { struct blob_buf b = {0}; struct xroute_stream *xroutes; 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); } -// 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, - struct ubus_object *obj, - struct ubus_request_data *req, - const char *method, struct blob_attr *msg) { + struct ubus_object *obj, + struct ubus_request_data *req, + const char *method, struct blob_attr *msg) { struct blob_buf b = {0}; struct route_stream *routes; struct route_list_entry *cur, *tmp; @@ -265,12 +267,13 @@ static void babeld_add_neighbour_buf(struct neighbour *neigh, 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, - struct ubus_object *obj, - struct ubus_request_data *req, - const char *method, - struct blob_attr *msg) { + struct ubus_object *obj, + struct ubus_request_data *req, + const char *method, + struct blob_attr *msg) { struct blob_buf b = {0}; struct neighbour *neigh; 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) { 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) return;