From 80630d48e70f61dc09c8bd0af7fcc222478aa738 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 14 Aug 2014 08:33:12 +1000 Subject: Optimise message sending. --- src/libraries/SledjHamr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/libraries/SledjHamr.c b/src/libraries/SledjHamr.c index 5b1cfd5..871b294 100644 --- a/src/libraries/SledjHamr.c +++ b/src/libraries/SledjHamr.c @@ -122,8 +122,8 @@ void sendBack(Ecore_Con_Client *client, const char *SID, const char *message, .. length += vsprintf(&buf[length], message, args); va_end(args); buf[length++] = '\n'; - buf[length++] = '\0'; - ecore_con_client_send(client, buf, strlen(buf)); + buf[length] = '\0'; + ecore_con_client_send(client, buf, length); ecore_con_client_flush(client); } @@ -139,7 +139,7 @@ void sendForth(Ecore_Con_Server *server, const char *SID, const char *message, . length += vsprintf(&buf[length], message, args); va_end(args); buf[length++] = '\n'; - buf[length++] = '\0'; - ecore_con_server_send(server, buf, strlen(buf)); + buf[length] = '\0'; + ecore_con_server_send(server, buf, length); ecore_con_server_flush(server); } -- cgit v1.1