Skip to content

Commit

Permalink
Merge pull request #4 from expressvpn/updates
Browse files Browse the repository at this point in the history
Dependency updates and QoL improvements
  • Loading branch information
expressvpn-raihaan-m authored Aug 2, 2023
2 parents 2791100 + d5ba7cc commit 75eb0f6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
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

0 comments on commit 75eb0f6

Please sign in to comment.