summaryrefslogtreecommitdiff
path: root/src/server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cc')
-rw-r--r--src/server.cc39
1 files changed, 25 insertions, 14 deletions
diff --git a/src/server.cc b/src/server.cc
index c8a359e..d91a4e5 100644
--- a/src/server.cc
+++ b/src/server.cc
@@ -1,31 +1,39 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/***************************************************************************
- * miav-rec.cc
+ * server.cc
*
* Mon Nov 8 11:35:01 CET 2004
* Copyright 2004 Bent Bisballe
* deva@aasimon.org
****************************************************************************/
+
/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This file is part of MIaV.
+ *
+ * MIaV is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Library General Public License for more details.
+ * MIaV is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License
+ * along with MIaV; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
+
/*
* $Id$
*/
+
/*
* $Log$
+ * Revision 1.11 2005/05/03 08:31:59 deva
+ * Removed the error object, and replaced it with a more generic info object.
+ *
* Revision 1.10 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)
@@ -35,8 +43,8 @@
*
* Revision 1.8 2005/05/01 09:56:26 deva
* Added Id and Log tags to all files
- *
*/
+
#include "server.h"
#include "miav.h"
@@ -59,6 +67,8 @@
#include "dv.h"
+#include "info_console.h"
+
void saveFrameAsImage(char* cpr, Frame *f)
{
ImgEncoder imgenc;
@@ -253,6 +263,7 @@ void newConnection(Socket *socket)
char cpr[256];
bool hasCpr = false;
ServerStatus status;
+ InfoConsole info;
n_savestate savestate = LATER;
n_header h;
@@ -265,7 +276,7 @@ void newConnection(Socket *socket)
printf("New connection[pid: %d]...\n", getpid());
- Network network = Network(socket);
+ Network network = Network(socket, &info);
while(int ret = network.recvPackage(&h, frame->data, frame->size)) {
status.checkPoint();
if(ret == -1) {