aboutsummaryrefslogtreecommitdiff
path: root/src/espik_net.c
diff options
context:
space:
mode:
authorbeber <beber>2005-08-22 18:39:41 +0000
committerbeber <beber>2005-08-22 18:39:41 +0000
commit759cc5ec91cdffe47cb5dee8f6e5134c8501e579 (patch)
tree69fe44e0fc2c783e1678058f77e611a3d2643646 /src/espik_net.c
parentSome jobs on irc commands (diff)
downloadespik-759cc5ec91cdffe47cb5dee8f6e5134c8501e579.tar.xz
Some work too
Del struct.h, move contents to espik.h
Diffstat (limited to '')
-rw-r--r--src/espik_net.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/espik_net.c b/src/espik_net.c
index c008234..16498de 100644
--- a/src/espik_net.c
+++ b/src/espik_net.c
@@ -6,8 +6,8 @@
#include "espik_net.h"
#include "espik_common_handler.h"
-#include "struct.h"
#include "espik_error.h"
+#include "espik.h"
typedef int (*Handler_Func) (void *data, int ev_type, void *ev);
@@ -17,16 +17,16 @@ void espik_con_init (t_info serv_info)
{
ecore_con_init ();
- con_sock =
- ecore_con_server_connect (ECORE_CON_REMOTE_SYSTEM, serv_info.server->host,
- (int)serv_info.server->port, NULL);
+ con_sock = ecore_con_server_connect (ECORE_CON_REMOTE_SYSTEM,
+ serv_info.server->host, (int)serv_info.server->port, NULL);
if (!con_sock)
{
fprintf (stderr, "ecore_con_server_connect failed\n");
exit (-1);
}
- ecore_event_handler_add (ECORE_CON_EVENT_SERVER_DATA, (Handler_Func) server_data, NULL);
+ ecore_event_handler_add (ECORE_CON_EVENT_SERVER_DATA,
+ (Handler_Func) server_data, NULL);
}
void espik_con_shutdown ()
@@ -37,7 +37,7 @@ void espik_con_shutdown ()
ecore_con_shutdown ();
printf ("< espik_con_shutdown\n");
-// ecore_main_loop_quit ();
+/* ecore_main_loop_quit (); */
}
void espik_raw_send (char *msg)
@@ -53,12 +53,14 @@ void espik_raw_send (char *msg)
snprintf (out, len, "%s\r\n", msg);
printf ("espik_raw_send:\nmsg: %s\nout: %s\n", msg, out);
-/* printf ("out[len-3]: 0x%X\n", out[len - 3]);
+/*
+ printf ("out[len-3]: 0x%X\n", out[len - 3]);
printf ("out[len-2]: 0x%X\n", out[len - 2]);
printf ("out[len-1]: 0x%X\n", out[len - 1]);
- */
+*/
- printf ("ecore_con_server_send: %d\n", ecore_con_server_send (con_sock, out, strlen (out)));
+ printf ("ecore_con_server_send: %d\n", ecore_con_server_send (con_sock,
+ out, strlen (out)));
free (out);
}