X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..29e9a2de0b45893850bbf56ee38e7fd235a6df15:/projects/stargazer/plugins/other/rscript/send_functor.h?ds=sidebyside

diff --git a/projects/stargazer/plugins/other/rscript/send_functor.h b/projects/stargazer/plugins/other/rscript/send_functor.h
index 479cdc3b..a14fe20b 100644
--- a/projects/stargazer/plugins/other/rscript/send_functor.h
+++ b/projects/stargazer/plugins/other/rscript/send_functor.h
@@ -32,30 +32,29 @@
 
 #include <functional>
 
-#include "os_int.h"
+#include "stg/os_int.h"
 
-class PacketSender : public std::unary_function<uint32_t, void> {
+class PacketSender : public std::unary_function<uint32_t, ssize_t> {
     public:
-        PacketSender(int s, char * b, int l, uint16_t p)
+        PacketSender(int s, char * b, size_t l, uint16_t p)
             : sock(s),
               buffer(b),
               length(l),
-              port(p) {};
-        void operator() (uint32_t ip)
+              port(p) {}
+        ssize_t 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;
         char * buffer;
-        int length;
+        size_t length;
         uint16_t port;
 };