From cae8a878811382886af21000064ff659309f7e4c Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Thu, 27 Jan 2011 12:16:20 +0200 Subject: [PATCH 1/1] =?utf8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=96=D0=BC=D0=B5?= =?utf8?q?=D0=BD=D0=BE=D0=B2=D0=B0=D0=BD=D0=BE=20=D0=BF=D0=B0=D1=80=D1=83?= =?utf8?q?=20=D0=B7=D0=BC=D1=96=D0=BD=D0=BD=D0=B8=D1=85=20=D0=B4=D0=BB?= =?utf8?q?=D1=8F=20=D0=B7=D0=B1=D0=B5=D1=80=D0=B5=D0=B6=D0=B5=D0=BD=D0=BD?= =?utf8?q?=D1=8F=20=D1=81=D0=B5=D0=BC=D0=B0=D0=BD=D1=82=D0=B8=D0=BA=D0=B8,?= =?utf8?q?=20=D0=B2=D0=B8=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=BE?= =?utf8?q?=20=D1=80=D0=BE=D0=B7=D0=BC=D1=96=D1=80=20=D0=BE=D0=B4=D0=BD?= =?utf8?q?=D0=BE=D0=B3=D0=BE=20=D1=96=D0=B7=20=D0=B1=D1=83=D1=84=D0=B5?= =?utf8?q?=D1=80=D1=96=D0=B2=20iov=20=D0=BF=D1=80=D0=B8=20=D1=87=D0=B8?= =?utf8?q?=D1=82=D0=B0=D0=BD=D0=BD=D1=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- projects/rscriptd/listener.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/projects/rscriptd/listener.cpp b/projects/rscriptd/listener.cpp index aca5da44..82dd6318 100644 --- a/projects/rscriptd/listener.cpp +++ b/projects/rscriptd/listener.cpp @@ -162,9 +162,9 @@ return false; //----------------------------------------------------------------------------- void * LISTENER::Run(void * d) { -LISTENER * ia = static_cast(d); +LISTENER * listener = static_cast(d); -ia->Runner(); +listener->Runner(); return NULL; } @@ -183,9 +183,9 @@ receiverStopped = true; //----------------------------------------------------------------------------- void * LISTENER::RunProcessor(void * d) { -LISTENER * ia = static_cast(d); +LISTENER * listener = static_cast(d); -ia->ProcessorRunner(); +listener->ProcessorRunner(); return NULL; } @@ -215,8 +215,6 @@ if (listenSocket < 0) return true; } -printfd(__FILE__, "Port: %d\n", port); - struct sockaddr_in listenAddr; listenAddr.sin_family = AF_INET; listenAddr.sin_port = htons(port); @@ -250,7 +248,7 @@ RS_PACKET_HEADER packetHead; iov[0].iov_base = reinterpret_cast(&packetHead); iov[0].iov_len = sizeof(packetHead); iov[1].iov_base = buffer; -iov[1].iov_len = sizeof(buffer); +iov[1].iov_len = sizeof(buffer) - sizeof(packetHead); size_t dataLen = 0; while (dataLen < sizeof(buffer)) @@ -321,7 +319,7 @@ if (strncmp((char *)packetTail.magic, RS_ID, RS_MAGIC_LEN)) } std::stringstream params; -params << data.login << " " +params << "\"" << data.login << "\" " << inet_ntostring(data.ip) << " " << data.id << " " << (char *)packetTail.params; -- 2.44.2