From 053097234da306dbef50f8a7a1591dceb5713b03 Mon Sep 17 00:00:00 2001 From: Arie Peterson <arie@greenhost.nl> Date: Wed, 5 Jul 2017 10:31:18 +0200 Subject: [PATCH] Rename encryption/add to encryption/init --- src/api/{encryption_add.c => encryption_init.c} | 2 +- src/cryptops-api.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) rename src/api/{encryption_add.c => encryption_init.c} (99%) diff --git a/src/api/encryption_add.c b/src/api/encryption_init.c similarity index 99% rename from src/api/encryption_add.c rename to src/api/encryption_init.c index 44faf35..17b1a0b 100644 --- a/src/api/encryption_add.c +++ b/src/api/encryption_init.c @@ -27,7 +27,7 @@ * @param[in] user_data extra data to pass between handler and main thread * @return internal status code */ -int callback_encryption_add(const struct _u_request * request, +int callback_encryption_init(const struct _u_request * request, struct _u_response * response, void * user_data) { bool * reboot = (bool *)user_data; diff --git a/src/cryptops-api.c b/src/cryptops-api.c index 5c348cf..c63d2b9 100644 --- a/src/cryptops-api.c +++ b/src/cryptops-api.c @@ -6,7 +6,7 @@ #include <auxiliary.c> #include <encryption_functions.c> #include <api/default.c> -#include <api/encryption_add.c> +#include <api/encryption_init.c> #include <api/encryption_unlock.c> #include <api/ssh_keys_get.c> @@ -36,8 +36,8 @@ int main(int argc, char ** argv) // Add api endpoints. bool reboot = false; - ulfius_add_endpoint_by_val(&instance, "POST", PREFIX, "/encryption/add", - 0, &callback_encryption_add, &reboot); + ulfius_add_endpoint_by_val(&instance, "POST", PREFIX, "/encryption/init", + 0, &callback_encryption_init, &reboot); ulfius_add_endpoint_by_val(&instance, "POST", PREFIX, "/encryption/unlock", 0, &callback_encryption_unlock, NULL); ulfius_add_endpoint_by_val(&instance, "GET" , PREFIX, "/ssh/keys", @@ -92,7 +92,7 @@ int main(int argc, char ** argv) ulfius_stop_framework(&instance); ulfius_clean_instance(&instance); - // Check if the encryption/add said that we should reboot. + // Check if the encryption/init handler said that we should reboot. if (reboot) { printf("rebooting..."); -- GitLab