diff options
author | mjentsch <mtthsjntsch@gmail.com> | 2014-12-26 20:54:12 +0300 |
---|---|---|
committer | mjentsch <mtthsjntsch@gmail.com> | 2014-12-26 20:54:12 +0300 |
commit | d08e54d3e0657e3b84bd6dc71e42980c31326875 (patch) | |
tree | 6d3b106d63ca7ed90ab4b8f2ae40c38a2272086c /tgp-net.c | |
parent | 4fa2b91eaae861c05db9e96008c30e94aab208af (diff) |
Move functions and defintions for plugin-internal structs into separate file and fix memory leak
Diffstat (limited to 'tgp-net.c')
-rw-r--r-- | tgp-net.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -42,6 +42,7 @@ #include <time.h> #include "tgp-net.h" +#include "tgp-structs.h" #include <tgl.h> #include <tgl-inner.h> @@ -334,7 +335,7 @@ struct connection *tgln_create_connection (struct tgl_state *TLS, const char *ho c->conn_timeout = MIN_EXP_TIMEOUT; - telegram_conn *conn = TLS->ev_base; + connection_data *conn = TLS->ev_base; c->prpl_data = purple_proxy_connect (conn->gc, conn->pa, host, port, net_on_connected, c); return c; @@ -347,8 +348,8 @@ static void restart_connection (struct connection *c) { return; } - telegram_conn *conn = TLS->ev_base; - c->prpl_data = purple_proxy_connect (conn->gc, conn->pa, c->ip, c->port, net_on_connected, c); + connection_data *conn = TLS->ev_base; + // c->prpl_data = purple_proxy_connect (conn->gc, conn->pa, c->ip, c->port, net_on_connected, c); } static void fail_connection (struct connection *c) { @@ -384,7 +385,7 @@ static void fail_connection (struct connection *c) { c->out_bytes = c->in_bytes = 0; if (c->state == conn_ready) { - telegram_conn *conn = TLS->ev_base; + connection_data *conn = TLS->ev_base; purple_connection_error_reason(conn->gc, PURPLE_CONNECTION_ERROR_OTHER_ERROR, "connection fail"); } c->prpl_data = NULL; // Did not find any destroy code. What should be done here? |