summaryrefslogtreecommitdiff
path: root/src/miav.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/miav.cc')
-rw-r--r--src/miav.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/miav.cc b/src/miav.cc
index ef2a369..2316413 100644
--- a/src/miav.cc
+++ b/src/miav.cc
@@ -26,6 +26,10 @@
*/
/*
* $Log$
+ * Revision 1.6 2005/05/02 19:47:43 deva
+ * Fixed overlapping cpr numbers on the server (now it saves one cpr pr.
+ * connection, and ignores any changes sent)
+ *
* Revision 1.5 2005/05/01 09:56:26 deva
* Added Id and Log tags to all files
*
@@ -71,19 +75,14 @@ int grab(int argc, char *argv[]) {
* This function starts the MIaV server.
*/
int server(int argc, char *argv[]) {
+ int port = config->readInt("server_port");
pid_t childpid; // variable to store the child's pid
signal(SIGCLD, SIG_IGN); // Ved SIGCHILD til IGNORE maa wait/waitpid ikke kaldes
// (ellers kommer der kernel-brok)
- if(argc < 1) {
- printf("Usage: miav server [port]\n");
- printf("[port] Is the port number the server will be listening to.\n");
- return 1;
- }
-
- printf("Listening on port %d\n",atoi(argv[0]));
- Socket *socket = new Socket(atoi(argv[0]));
+ printf("Listening on port %d\n", port);
+ Socket *socket = new Socket(port);
while(1) {
Socket *csocket = new Socket(socket->slisten());