aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/libraries/SledjHamr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libraries/SledjHamr.c')
-rw-r--r--src/libraries/SledjHamr.c47
1 files changed, 1 insertions, 46 deletions
diff --git a/src/libraries/SledjHamr.c b/src/libraries/SledjHamr.c
index dff80ee..4d0efbc 100644
--- a/src/libraries/SledjHamr.c
+++ b/src/libraries/SledjHamr.c
@@ -88,31 +88,9 @@ static boolean checkConnection(Connection *conn, char *func, connType wanted, bo
88 return result; 88 return result;
89} 89}
90 90
91void sendBack(Connection *conn, const char *SID, const char *message, ...) 91void send2(Connection *conn, const char *SID, const char *message, ...)
92{
93 va_list args;
94// Ecore_Con_Client *client = conn->conn.client.client;
95 char buf[PATH_MAX * 2];
96 int length = strlen(SID);
97
98 strncpy(buf, SID, length);
99 buf[length++] = '.';
100 va_start(args, message);
101 length += vsprintf(&buf[length], message, args);
102 va_end(args);
103 buf[length++] = '\n';
104 buf[length] = '\0';
105// PD("sendBack(%s", buf);
106// ecore_con_client_send(client, buf, length);
107// ecore_con_client_flush(client);
108//Connection *conn = ecore_con_client_data_get(client);
109if (conn) send2(conn, SID, buf); else PE("sendBack() can't find Connection!");
110}
111
112void sendForth(Connection *conn, const char *SID, const char *message, ...)
113{ 92{
114 va_list args; 93 va_list args;
115// Ecore_Con_Server *server = conn->conn.server.server;
116 char buf[PATH_MAX * 2]; 94 char buf[PATH_MAX * 2];
117 int length = strlen(SID); 95 int length = strlen(SID);
118 96
@@ -123,29 +101,6 @@ void sendForth(Connection *conn, const char *SID, const char *message, ...)
123 va_end(args); 101 va_end(args);
124 buf[length++] = '\n'; 102 buf[length++] = '\n';
125 buf[length] = '\0'; 103 buf[length] = '\0';
126// PD("sendForth(%s", buf);
127// ecore_con_server_send(server, buf, length);
128// ecore_con_server_flush(server);
129//Connection *conn = ecore_con_server_data_get(server);
130if (conn) send2(conn, SID, buf); else PE("sendForth() can't find Connection!");
131}
132
133void send2(Connection *conn, const char *SID, const char *message, ...)
134{
135 va_list args;
136 char buf[PATH_MAX * 2];
137 int length = strlen(SID);
138
139length = 0;
140// strncpy(buf, SID, length);
141// buf[length++] = '.';
142 va_start(args, message);
143// length += vsprintf(&buf[length], message, args);
144 va_end(args);
145strcpy(buf, message);
146length = strlen(buf);
147// buf[length++] = '\n';
148 buf[length] = '\0';
149 104
150// TODO - Should check if this is always gonna be local? Likely not. 105// TODO - Should check if this is always gonna be local? Likely not.
151 if (checkConnection(conn, "send2", conn->type, FALSE)) 106 if (checkConnection(conn, "send2", conn->type, FALSE))