-/* Copyright (C) 2009, Martin Johansson <martin@fatbob.nu>
- Copyright (C) 2005-2009, Thorvald Natvig <thorvald@natvig.com>
+/* Copyright (C) 2009-2010, Martin Johansson <martin@fatbob.nu>
+ Copyright (C) 2005-2010, Thorvald Natvig <thorvald@natvig.com>
All rights reserved.
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
+#include <stdlib.h>
#include "client.h"
#include "conf.h"
#include "log.h"
#include "timer.h"
+#include "version.h"
#define LISTEN_SOCK 0
#define TCP_SOCK 0
#define UDP_SOCK 1
-int udpsock; /* XXX restructure! */
+/* globals */
+int udpsock;
bool_t shutdown_server;
void Server_run()
Timer_init(&janitorTimer);
- Log_info("uMurmur voicechat server started -- http://code.google.com/p/umurmur/");
-
+ Log_info("uMurmur version %s protocol version %d.%d.%d",
+ UMURMUR_VERSION, PROTVER_MAJOR, PROTVER_MINOR, PROTVER_PATCH);
+ Log_info("Visit http://code.google.com/p/umurmur/");
+
/* Main server loop */
while (!shutdown_server) {
struct sockaddr_in remote;
tcpfd = accept(pollfds[LISTEN_SOCK].fd, (struct sockaddr*)&remote, &addrlen);
fcntl(tcpfd, F_SETFL, O_NONBLOCK);
setsockopt(tcpfd, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(int));
- Log_info("Connection from %s port %d\n", inet_ntoa(remote.sin_addr),
- ntohs(remote.sin_port));
+ Log_debug("Connection from %s port %d\n", inet_ntoa(remote.sin_addr),
+ ntohs(remote.sin_port));
Client_add(tcpfd, &remote);
}