From: Maxim Mamontov <faust@gts.dp.ua>
Date: Wed, 8 Dec 2010 13:15:01 +0000 (+0200)
Subject: В функторе для рассылки данных об авторизованных пользователях по
X-Git-Tag: 2.407-rc3~320
X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/4d9199a0203c54711e764c835bae5945417257e5?ds=inline

В функторе для рассылки данных об авторизованных пользователях по
NAS'ам убраны не используемые переменные
---

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<uint32_t, void> {
+class PacketSender : public std::unary_function<uint32_t, int> {
     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;