Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency updates and QoL improvements #4

Merged
merged 5 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
:fetch:
:method: :git
:source: https://github.com/libuv/libuv.git
:tag: v1.40.0
:tag: v1.46.0
:build:
- "sh autogen.sh"
- "./configure --prefix=$(pwd)/../builds/libuv/ --enable-static --disable-shared"
Expand All @@ -110,7 +110,7 @@
:fetch:
:method: :git
:source: https://github.com/zma/zlog.git
:commit: 0f31521
:commit: 16f266e
:build:
- mkdir -p tidy
- cp zlog.c tidy/
Expand All @@ -129,7 +129,7 @@
:fetch:
:method: :git
:source: https://github.com/cofyc/argparse.git
:tag: v1.0.2
:tag: v1.1.0
:build:
- mkdir -p tidy
- cp argparse.c tidy/
Expand Down
4 changes: 2 additions & 2 deletions src/he/helium.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ he_return_code_t nudge_time_cb(he_conn_t *client, int timeout, void *context) {
}

he_return_code_t server_event_cb(he_conn_t *client, he_conn_event_t event, void *context) {
zlogf_time(ZLOG_INFO_LOG_MSG, "Event occurred %d\n", event);
zlogf_time(ZLOG_INFO_LOG_MSG, "Event occurred %s\n", he_client_event_name(event));

return HE_SUCCESS;
}
Expand All @@ -77,7 +77,7 @@ he_return_code_t state_change_cb(he_conn_t *client, he_conn_state_t new_state, v
// Get our context back
lw_state_t *state = (lw_state_t *)context;

zlogf_time(ZLOG_INFO_LOG_MSG, "State changed %d\n", new_state);
zlogf_time(ZLOG_INFO_LOG_MSG, "State changed to %s\n", he_client_state_name(new_state));

if(new_state == HE_STATE_DISCONNECTED) {
zlogf_time(ZLOG_INFO_LOG_MSG, "Helium connection was disconnected\n");
Expand Down
2 changes: 2 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ static const char *const usage[] = {
int main(int argc, const char **argv) {
// Initialise logging
zlog_init_stdout();
// Flush logs every second
zlog_init_flush_thread_with_interval(1);
atexit(zlog_finish);

int server = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/udp/flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void on_read(uv_udp_t *handle, ssize_t nread, const uv_buf_t *buf, const struct

if(res != HE_SUCCESS) {
bool fatal = he_conn_is_error_fatal(state->he_conn, res);
zlogf_time(ZLOG_INFO_LOG_MSG, "Non-zero return code from libhelium: %d Fatal?: %s", res,
zlogf_time(ZLOG_INFO_LOG_MSG, "Non-zero return code from libhelium: %s Fatal?: %s", he_return_code_name(res),
fatal ? "true" : "false");
if(fatal) {
lw_state_disconnect(state);
Expand Down