Skip to content

Commit

Permalink
opcua_server.c: Put syslog init before signal handling (#47)
Browse files Browse the repository at this point in the history
Otherwise error logging would not work properly.

Signed-off-by: Joakim Roubert <[email protected]>
  • Loading branch information
joakimr-axis authored Sep 4, 2023
1 parent a4bc7f8 commit f63add0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"group": "sdk"
},
"runMode": "respawn",
"version": "1.2.4"
"version": "1.2.5"
},
"configuration": {
"paramConfig": [
Expand Down
10 changes: 5 additions & 5 deletions opcua_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,14 +356,14 @@ static gboolean signal_handler_init(void)

int main(int argc, char **argv)
{
char *app_name = basename(argv[0]);
open_syslog(app_name);

if (!signal_handler_init())
{
return -1;
return EXIT_FAILURE;
}

char *app_name = basename(argv[0]);
open_syslog(app_name);

// Setup D-Bus
LOG_I("%s/%s: Setup D-Bus", __FILE__, __FUNCTION__);
if (!dbus_all_init())
Expand Down Expand Up @@ -412,5 +412,5 @@ int main(int argc, char **argv)
LOG_I("%s/%s: Closing syslog ...", __FILE__, __FUNCTION__);
close_syslog();

return 0;
return EXIT_SUCCESS;
}

0 comments on commit f63add0

Please sign in to comment.