mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-20 02:38:32 +00:00
Format fixes - ubus.c
This commit is contained in:
@@ -51,7 +51,8 @@ void set_ubus_listeners()
|
||||
|
||||
void check_ubus_listeners()
|
||||
{
|
||||
if (!ubus) {
|
||||
if (!ubus)
|
||||
{
|
||||
ubus = ubus_connect(NULL);
|
||||
if (!ubus)
|
||||
return;
|
||||
@@ -61,7 +62,8 @@ void check_ubus_listeners()
|
||||
if (poll_check(ubus->sock.fd, POLLIN))
|
||||
ubus_handle_event(ubus);
|
||||
|
||||
if (poll_check(ubus->sock.fd, POLLHUP)) {
|
||||
if (poll_check(ubus->sock.fd, POLLHUP))
|
||||
{
|
||||
ubus_free(ubus);
|
||||
ubus = NULL;
|
||||
}
|
||||
@@ -74,9 +76,8 @@ static int ubus_handle_metrics(struct ubus_context *ctx, struct ubus_object *obj
|
||||
{
|
||||
blob_buf_init(&b, 0);
|
||||
|
||||
for(int i=0; i < __METRIC_MAX; i++) {
|
||||
for(int i=0; i < __METRIC_MAX; i++)
|
||||
blobmsg_add_u32(&b, get_metric_name(i), daemon->metrics[i]);
|
||||
}
|
||||
|
||||
ubus_send_reply(ctx, req, b.head);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user