Skip to content

Commit

Permalink
add default settings section to connect message
Browse files Browse the repository at this point in the history
Signed-off-by: John Crispin <john@phrozen.org>
  • Loading branch information
blogic committed Nov 7, 2023
1 parent 3025bf9 commit d3ad7e4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,14 @@ connect_send(void)
return;
}
blobmsg_close_table(&proto, c);
if (!stat("/etc/ucentral/ucentral.defaults", &statbuf)) {
c = blobmsg_open_table(&proto, "defaults");
if (!blobmsg_add_json_from_file(&proto, "/etc/ucentral/ucentral.defaults")) {
log_send("failed to load defaults", LOG_ERR);
return;
}
blobmsg_close_table(&proto, c);
}
if (!stat("/etc/ucentral/restrictions.json", &statbuf))
blobmsg_add_u8(&proto, "restricted", 1);
blobmsg_close_table(&proto, m);
Expand Down

0 comments on commit d3ad7e4

Please sign in to comment.