summaryrefslogtreecommitdiff
path: root/src/server.cc
diff options
context:
space:
mode:
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);
}