diff options
| author | Anton <anton@picapica> | 2019-03-07 23:11:43 +0400 |
|---|---|---|
| committer | Anton <anton@picapica> | 2019-03-07 23:11:43 +0400 |
| commit | 4ce5190737d1ba6aab05b2d7ed14760854c2b980 (patch) | |
| tree | 3d82a143fdef4eec416d8b4cbeb36d23609e6640 /PICA_node.c | |
| parent | 24f85e400476f5add7ffa9fc40629339ac840324 (diff) | |
| download | pica-pica-4ce5190737d1ba6aab05b2d7ed14760854c2b980.tar.gz pica-pica-4ce5190737d1ba6aab05b2d7ed14760854c2b980.zip | |
pica-node: add log info message on startup with version, pid, protocol version
Diffstat (limited to 'PICA_node.c')
| -rw-r--r-- | PICA_node.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/PICA_node.c b/PICA_node.c index 256f999..2261e5b 100644 --- a/PICA_node.c +++ b/PICA_node.c @@ -3557,11 +3557,19 @@ void PICA_node_joinskynet(const char* addrlistfilename, const char *my_addr) int main(int argc, char** argv) { + uint32_t pid; process_cmdline(argc, argv); nodecfg.config_file = (nodecfg.config_file ? nodecfg.config_file : PICA_NODECONFIG_DEF_CONFIG_FILE); +#ifdef WIN32 + pid = GetCurrentProcessId(); +#else + pid = getpid(); +#endif + PICA_info("pica-node v%s started. PID: %u, protocol version: %s", PACKAGE_VERSION, pid, PICA_PROTO_VER_STRING); + if (!PICA_nodeconfig_load(nodecfg.config_file)) { PICA_fatal("Unable to load configuration. Please check if config file %s exists and has correct permissions", nodecfg.config_file); |
