summaryrefslogtreecommitdiff
path: root/src/server.cc
diff options
context:
space:
mode:
authordeva <deva>2005-10-13 09:08:32 +0000
committerdeva <deva>2005-10-13 09:08:32 +0000
commit56632c4b32abc705f613475c3b78ae7a5dd4a3d2 (patch)
tree1e64789daa4111a30b20b99405c9cc15c0da98c7 /src/server.cc
parent1d30dc5da0c148982032a2b5a5bdece10b3e80ae (diff)
*** empty log message ***
Diffstat (limited to 'src/server.cc')
-rw-r--r--src/server.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server.cc b/src/server.cc
index 29571d6..34f0b30 100644
--- a/src/server.cc
+++ b/src/server.cc
@@ -57,6 +57,7 @@
void newConnection(Socket *socket, Info *info)
{
char cpr[256];
+ char clientip[64];
bool hasCpr = false;
ServerStatus status(info);
@@ -71,6 +72,8 @@ void newConnection(Socket *socket, Info *info)
info->info("CONNECTION OPENED");
info->info("New connection (%s)", inet_ntoa(socket->socketaddr.sin_addr));
+ sprintf(clientip, "%s", inet_ntoa(socket->socketaddr.sin_addr));
+
Network network = Network(socket, info);
while(int ret = network.recvPackage(&h, frame->data, frame->size)) {
@@ -109,7 +112,7 @@ void newConnection(Socket *socket, Info *info)
// This one must be last!
if(h.header.h_data.record) {
// if(!enc) enc = newMovEncoder(cpr);
- if(!enc) enc = new MovEncoderThread(cpr, info);
+ if(!enc) enc = new MovEncoderThread(clientip, cpr, info);
enc->encode(frame);
}