Skip to content

Commit

Permalink
Configure logging facility sooner.
Browse files Browse the repository at this point in the history
Error messages from initialization were missing.

Signed-off-by: Miroslav Lichvar <[email protected]>
  • Loading branch information
mlichvar authored and richardcochran committed Aug 27, 2012
1 parent afbec38 commit 2040933
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ptp4l.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ int main(int argc, char *argv[])
return -1;
}

print_set_verbose(cfg_settings.verbose);
print_set_syslog(cfg_settings.use_syslog);
print_set_level(cfg_settings.print_level);

for (i = 0; i < nports; i++) {
if (config_create_interface(ports[i], &cfg_settings) < 0) {
fprintf(stderr, "too many interfaces\n");
Expand Down Expand Up @@ -263,10 +267,6 @@ int main(int argc, char *argv[])
return -1;
}

print_set_verbose(cfg_settings.verbose);
print_set_syslog(cfg_settings.use_syslog);
print_set_level(cfg_settings.print_level);

clock = clock_create(phc_index, iface, cfg_settings.nports,
*timestamping, ds);
if (!clock) {
Expand Down

0 comments on commit 2040933

Please sign in to comment.