Path: blob/main/comms/aprsd/files/patch-src_aprsd.cpp
16461 views
--- src/aprsd.cpp.orig 2003-05-29 03:09:39 UTC1+++ src/aprsd.cpp2@@ -98,7 +98,8 @@ string szAprsPath;3int msgsn;45const string HOMEDIR("/home/aprsd2");6-const string CONFPATH("");7+const string LOGPATH("/var/log/aprsd/");8+const string CONFPATH("/usr/local/etc/aprsd/");9const string CONFFILE("aprsd.conf");10const string MAINLOG("aprsd.log");11const string STSMLOG("thirdparty.log");12@@ -126,7 +127,7 @@ void serverQuit(void) /* Invoked by console 'q' q13WriteLog(string("Server Shutdown"), MAINLOG);14tcsetattr(fileno(stdin),TCSANOW,&initial_settings); //restore terminal mode1516- string outFile = CONFPATH;17+ string outFile = LOGPATH;18outFile += SAVE_HISTORY;19int n = SaveHistory(outFile);2021@@ -872,8 +873,8 @@ int daemonInit(void)22if (f.is_open()) {23f.read(s, 10);24xx = atoi(s);25- kill(xx, SIGCHLD); // Meaningless kill to determine if pid is used26- if (errno != ESRCH) {27+ kill(xx, 0); // Meaningless kill to determine if pid is used28+ if (errno == 0) {29cout << "aprsd already running" << endl;30cout << "PID: " << pid_file << endl;31exit(1);32@@ -977,7 +978,7 @@ int main(int argc, char *argv[])3334//fdump = fopen("dump.txt","w+"); //debug3536- string histFile = CONFPATH;37+ string histFile = LOGPATH;38histFile += SAVE_HISTORY;39ReadHistory(histFile);40414243