Skip to content

Commit

Permalink
uncrustify
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperpedersen committed Jan 18, 2025
1 parent da88a3a commit 9c44ae7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,6 @@ update_user(char* users_path, char* username, char* password, bool generate_pwd,
goto error;
}


if (create_response(users_path, j, &response))
{
goto error;
Expand Down
10 changes: 5 additions & 5 deletions src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ display_helper(char* command)
else if (!strcmp(command, COMMAND_CONFIG_GET) ||
!strcmp(command, COMMAND_CONFIG_LS) ||
!strcmp(command, COMMAND_CONFIG_SET) ||
!strcmp(command, COMMAND_RELOAD))
!strcmp(command, COMMAND_RELOAD))
{
help_conf();
}
Expand Down Expand Up @@ -1329,7 +1329,7 @@ process_result(SSL* ssl, int socket, int32_t output_format)
return 1;
}

static int
static int
process_ls_result(SSL* ssl, int socket, int32_t output_format)
{
struct json* read = NULL;
Expand Down Expand Up @@ -1357,7 +1357,7 @@ process_ls_result(SSL* ssl, int socket, int32_t output_format)
struct json_iterator* iter = NULL;
pgagroal_json_iterator_create(json_res, &iter);
while (pgagroal_json_iterator_next(iter))
{
{
char* value = pgagroal_value_to_string(iter->value, FORMAT_TEXT, NULL, 0);
printf("%s\n", value);
free(value);
Expand Down Expand Up @@ -1696,11 +1696,11 @@ get_conf_path_result(struct json* j, uintptr_t* r)
{
pgagroal_json_put(conf_path_response, CONFIGURATION_ARGUMENT_ADMIN_CONF_PATH, (uintptr_t)pgagroal_json_get(response, CONFIGURATION_ARGUMENT_ADMIN_CONF_PATH), ValueString);
}
if (pgagroal_json_contains_key(response, CONFIGURATION_ARGUMENT_MAIN_CONF_PATH))
if (pgagroal_json_contains_key(response, CONFIGURATION_ARGUMENT_MAIN_CONF_PATH))
{
pgagroal_json_put(conf_path_response, CONFIGURATION_ARGUMENT_MAIN_CONF_PATH, (uintptr_t)pgagroal_json_get(response, CONFIGURATION_ARGUMENT_MAIN_CONF_PATH), ValueString);
}
if (pgagroal_json_contains_key(response, CONFIGURATION_ARGUMENT_USER_CONF_PATH))
if (pgagroal_json_contains_key(response, CONFIGURATION_ARGUMENT_USER_CONF_PATH))
{
pgagroal_json_put(conf_path_response, CONFIGURATION_ARGUMENT_USER_CONF_PATH, (uintptr_t)pgagroal_json_get(response, CONFIGURATION_ARGUMENT_USER_CONF_PATH), ValueString);
}
Expand Down
1 change: 0 additions & 1 deletion src/include/management.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ extern "C" {
#define MANAGEMENT_OUTPUT_FORMAT_JSON 1
#define MANAGEMENT_OUTPUT_FORMAT_RAW 2


/**
* Create header for management command
* @param command The command
Expand Down
6 changes: 3 additions & 3 deletions src/libpgagroal/configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -5379,14 +5379,14 @@ add_servers_configuration_response(struct json* res)
{
return;
}

pgagroal_json_put(server_conf, CONFIGURATION_ARGUMENT_HOST, (uintptr_t)config->servers[i].host, ValueString);
pgagroal_json_put(server_conf, CONFIGURATION_ARGUMENT_PORT, (uintptr_t)config->servers[i].port, ValueInt64);
pgagroal_json_put(server_conf, CONFIGURATION_ARGUMENT_TLS, (uintptr_t)config->servers[i].tls, ValueBool);
pgagroal_json_put(server_conf, CONFIGURATION_ARGUMENT_TLS_CERT_FILE, (uintptr_t)config->servers[i].tls_cert_file, ValueString);
pgagroal_json_put(server_conf, CONFIGURATION_ARGUMENT_TLS_KEY_FILE, (uintptr_t)config->servers[i].tls_key_file, ValueString);
pgagroal_json_put(server_conf, CONFIGURATION_ARGUMENT_TLS_CA_FILE, (uintptr_t)config->servers[i].tls_ca_file, ValueString);

pgagroal_json_put(res, config->servers[i].name, (uintptr_t)server_conf, ValueJSON);
}
}
Expand Down Expand Up @@ -5672,7 +5672,7 @@ pgagroal_conf_set(SSL* ssl, int client_fd, uint8_t compression, uint8_t encrypti
memcpy(config->common.tls_key_file, config_value, max);
config->common.tls_key_file[max] = '\0';
pgagroal_json_put(response, key, (uintptr_t)config->common.tls_key_file, ValueString);
}
}
}
else if (!strcmp(key, "tls_ca_file"))
{
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@ accept_mgt_cb(struct ev_loop* loop, struct ev_io* watcher, int revents)
else if (pid == 0)
{
struct json* pyl = NULL;

shutdown_ports();

pgagroal_json_clone(payload, &pyl);
Expand Down

0 comments on commit 9c44ae7

Please sign in to comment.