From 5327e6d18bbfc8d205291837307c6305c49d24e8 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Tue, 2 Jun 2020 16:00:01 -0400 Subject: [PATCH] chore: rename module function --- runtime/src/module.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/runtime/src/module.c b/runtime/src/module.c index 152a7a2..c63df17 100644 --- a/runtime/src/module.c +++ b/runtime/src/module.c @@ -17,7 +17,7 @@ * @param module **/ static inline void -module_initialize_as_server(struct module *module) +module_listen(struct module *module) { // Allocate a new socket int socket_descriptor = socket(AF_INET, SOCK_STREAM, 0); @@ -162,7 +162,7 @@ module_new(char *name, char *path, i32 argument_count, u32 stack_size, u32 max_m module_database_add(module); // Start listening for requests - module_initialize_as_server(module); + module_listen(module); return module; @@ -234,16 +234,16 @@ module_new_from_json(char *file_name) memset(request_headers, 0, HTTP_MAX_HEADER_LENGTH * HTTP_MAX_HEADER_COUNT); char *reponse_headers = (char *)malloc(HTTP_MAX_HEADER_LENGTH * HTTP_MAX_HEADER_COUNT); memset(reponse_headers, 0, HTTP_MAX_HEADER_LENGTH * HTTP_MAX_HEADER_COUNT); - i32 request_size = 0; - i32 response_size = 0; - i32 argument_count = 0; - u32 port = 0; - u32 relative_deadline_us = 0; - i32 is_active = 0; - i32 request_count = 0; - i32 response_count = 0; - int j = 1; - int ntoks = 2 * tokens[i].size; + i32 request_size = 0; + i32 response_size = 0; + i32 argument_count = 0; + u32 port = 0; + u32 relative_deadline_us = 0; + i32 is_active = 0; + i32 request_count = 0; + i32 response_count = 0; + int j = 1; + int ntoks = 2 * tokens[i].size; char request_content_type[HTTP_MAX_HEADER_VALUE_LENGTH] = { 0 }; char response_content_type[HTTP_MAX_HEADER_VALUE_LENGTH] = { 0 };