chore: updated readme and makefile
This commit is contained in:
parent
94da7584aa
commit
ce0abcdc25
4 changed files with 11 additions and 18 deletions
|
|
@ -34,10 +34,10 @@ bool lander_insert_entry(lnm_http_loop_ctx *ctx, bool secure) {
|
|||
if (key_len == 0) {
|
||||
// Generate a random key to insert
|
||||
key_len = secure ? 16 : 4;
|
||||
char *key_s = malloc((key_len + 1) * sizeof(char));
|
||||
key_s = malloc((key_len + 1) * sizeof(char));
|
||||
|
||||
randomize_key(key_s, key_len);
|
||||
lsm_str_init(&key, key_s);
|
||||
randomize_key((char *)key_s, key_len);
|
||||
lsm_str_init(&key, (char *)key_s);
|
||||
} else {
|
||||
lsm_str_init_copy_n(&key, key_s, key_len);
|
||||
}
|
||||
|
|
|
|||
12
src/main.c
12
src/main.c
|
|
@ -6,7 +6,6 @@
|
|||
#include "lnm/log.h"
|
||||
|
||||
#include "lander.h"
|
||||
#include "log.h"
|
||||
|
||||
const char *lander_server = "lander/" LANDER_VERSION;
|
||||
|
||||
|
|
@ -102,7 +101,7 @@ int main() {
|
|||
srand(time(NULL));
|
||||
|
||||
lnm_log_init_global();
|
||||
lnm_log_register_stdout(lnm_log_level_debug);
|
||||
lnm_log_register_stdout(lnm_log_level_info);
|
||||
|
||||
ENV(api_key, "LANDER_API_KEY");
|
||||
ENV_OPT(port_str, "LANDER_PORT", "18080");
|
||||
|
|
@ -131,13 +130,4 @@ int main() {
|
|||
lsm_store_size(c_gctx->store));
|
||||
lnm_http_loop *hl = loop_init(c_gctx, api_key);
|
||||
lnm_http_loop_run(hl, port, 1, 0);
|
||||
|
||||
/* http_loop *hl = http_loop_init( */
|
||||
/* lander_routes, sizeof(lander_routes) / sizeof(lander_routes[0]),
|
||||
* c_gctx, */
|
||||
/* lander_ctx_init, (void (*)(void *))lander_ctx_reset, */
|
||||
/* (void (*)(void *))lander_ctx_free); */
|
||||
/* http_loop_set_api_key(hl, api_key); */
|
||||
|
||||
/* http_loop_run(hl, port); */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue