/soc/2013/ankitkv/gobjectification: 6428f75bffc8: Merged soc.201...
Ankit Vani
a at nevitus.org
Tue Aug 27 18:09:46 EDT 2013
Changeset: 6428f75bffc86492f2ba81ce339472237db95cd0
Author: Ankit Vani <a at nevitus.org>
Date: 2013-08-28 03:39 +0530
Branch: soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/6428f75bffc8
Description:
Merged soc.2013.gobjectification branch
diffstat:
libpurple/core.h | 2 ++
libpurple/http.c | 30 ++----------------------------
2 files changed, 4 insertions(+), 28 deletions(-)
diffs (72 lines):
diff --git a/libpurple/core.h b/libpurple/core.h
--- a/libpurple/core.h
+++ b/libpurple/core.h
@@ -37,6 +37,8 @@
#ifndef _PURPLE_CORE_H_
#define _PURPLE_CORE_H_
+#include <glib.h>
+
typedef struct PurpleCore PurpleCore;
/** Callbacks that fire at different points of the initialization and teardown
diff --git a/libpurple/http.c b/libpurple/http.c
--- a/libpurple/http.c
+++ b/libpurple/http.c
@@ -531,10 +531,6 @@ purple_http_socket_connect_new(PurpleCon
host, port,
_purple_http_socket_connected_ssl,
_purple_http_socket_connected_ssl_error, hs);
-/* TODO
- purple_ssl_set_compatibility_level(hs->ssl_connection,
- PURPLE_SSL_COMPATIBILITY_SECURE);
-*/
} else {
hs->raw_connection = purple_proxy_connect(gc, account,
host, port,
@@ -577,34 +573,14 @@ purple_http_socket_write(PurpleHttpSocke
return write(hs->fd, buf, len);
}
-static void _purple_http_socket_watch_recv_ssl(gpointer _hs,
- PurpleSslConnection *ssl_connection, PurpleInputCondition cond)
-{
- PurpleHttpSocket *hs = _hs;
-
- g_return_if_fail(hs != NULL);
-
- hs->watch_cb(hs->cb_data, hs->fd, cond);
-}
-
static void
purple_http_socket_watch(PurpleHttpSocket *hs, PurpleInputCondition cond,
PurpleInputFunction func, gpointer user_data)
{
g_return_if_fail(hs != NULL);
- if (hs->inpa > 0)
- purple_input_remove(hs->inpa);
- hs->inpa = 0;
-
- if (cond == PURPLE_INPUT_READ && hs->is_ssl) {
- hs->watch_cb = func;
- hs->cb_data = user_data;
- purple_ssl_input_add(hs->ssl_connection,
- _purple_http_socket_watch_recv_ssl, hs);
- }
- else
- hs->inpa = purple_input_add(hs->fd, cond, func, user_data);
+ purple_http_socket_dontwatch(hs);
+ hs->inpa = purple_input_add(hs->fd, cond, func, user_data);
}
static void
@@ -615,8 +591,6 @@ purple_http_socket_dontwatch(PurpleHttpS
if (hs->inpa > 0)
purple_input_remove(hs->inpa);
hs->inpa = 0;
- if (hs->ssl_connection)
- purple_ssl_input_remove(hs->ssl_connection);
}
static void
More information about the Commits
mailing list