From 4d9199a0203c54711e764c835bae5945417257e5 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Wed, 8 Dec 2010 15:15:01 +0200 Subject: [PATCH 1/1] =?utf8?q?=D0=92=20=D1=84=D1=83=D0=BD=D0=BA=D1=82?= =?utf8?q?=D0=BE=D1=80=D0=B5=20=D0=B4=D0=BB=D1=8F=20=D1=80=D0=B0=D1=81?= =?utf8?q?=D1=81=D1=8B=D0=BB=D0=BA=D0=B8=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B?= =?utf8?q?=D1=85=20=D0=BE=D0=B1=20=D0=B0=D0=B2=D1=82=D0=BE=D1=80=D0=B8?= =?utf8?q?=D0=B7=D0=BE=D0=B2=D0=B0=D0=BD=D0=BD=D1=8B=D1=85=20=D0=BF=D0=BE?= =?utf8?q?=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8F?= =?utf8?q?=D1=85=20=D0=BF=D0=BE=20NAS'=D0=B0=D0=BC=20=D1=83=D0=B1=D1=80?= =?utf8?q?=D0=B0=D0=BD=D1=8B=20=D0=BD=D0=B5=20=D0=B8=D1=81=D0=BF=D0=BE?= =?utf8?q?=D0=BB=D1=8C=D0=B7=D1=83=D0=B5=D0=BC=D1=8B=D0=B5=20=D0=BF=D0=B5?= =?utf8?q?=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D1=8B=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- projects/stargazer/plugins/other/rscript/send_functor.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/projects/stargazer/plugins/other/rscript/send_functor.h b/projects/stargazer/plugins/other/rscript/send_functor.h index 479cdc3b..8e216295 100644 --- a/projects/stargazer/plugins/other/rscript/send_functor.h +++ b/projects/stargazer/plugins/other/rscript/send_functor.h @@ -34,23 +34,22 @@ #include "os_int.h" -class PacketSender : public std::unary_function { +class PacketSender : public std::unary_function { public: PacketSender(int s, char * b, int l, uint16_t p) : sock(s), buffer(b), length(l), port(p) {}; - void operator() (uint32_t ip) + int operator() (uint32_t ip) { - int res; struct sockaddr_in sendAddr; sendAddr.sin_family = AF_INET; sendAddr.sin_port = port; sendAddr.sin_addr.s_addr = ip; - res = sendto(sock, buffer, length, 0, (struct sockaddr*)&sendAddr, sizeof(sendAddr)); + return sendto(sock, buffer, length, 0, (struct sockaddr*)&sendAddr, sizeof(sendAddr)); } private: int sock; -- 2.44.2