Skip to content
Merged
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
8 changes: 6 additions & 2 deletions tools/nut-scanner/nut-scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ int main(int argc, char *argv[])
xml_sec.usec_timeout = -1; /* Override with the "timeout" common setting later */
xml_sec.peername = NULL;

nutscan_init();

display_func = nutscan_display_ups_conf;

/* Note: the getopts print an error message about unknown arguments
Expand Down Expand Up @@ -468,6 +466,12 @@ int main(int argc, char *argv[])
/* BEWARE: allow_all does not include allow_eaton_serial! */
}

/* TODO: nutscan_init() should consider (via args? shared global vars?)
* which scan types we desire at this run, and not try to load irrelevant
* libraries.
*/
nutscan_init();

/* TODO/discuss : Should the #else...#endif code below for lack of pthreads
* during build also serve as a fallback for pthread failure at runtime?
*/
Expand Down