/soc/2012/michael/android: 49d63fd6e246: Fixed srv/txt ui ops ge...
Michael Zangl
michael at soc.pidgin.im
Fri Aug 3 04:43:18 EDT 2012
Changeset: 49d63fd6e246c29b5422e430cdd8dfac51b29f93
Author: Michael Zangl <michael at soc.pidgin.im>
Date: 2012-08-02 11:13 +0200
Branch: soc.2012.android
URL: http://hg.pidgin.im/soc/2012/michael/android/rev/49d63fd6e246
Description:
Fixed srv/txt ui ops get_ui_data to return a void* and changed PurpleDnsType to be a type.
diffstat:
libpurple/dnssrv.c | 14 +++++++-------
libpurple/dnssrv.h | 8 ++++----
2 files changed, 11 insertions(+), 11 deletions(-)
diffs (100 lines):
diff --git a/libpurple/dnssrv.c b/libpurple/dnssrv.c
--- a/libpurple/dnssrv.c
+++ b/libpurple/dnssrv.c
@@ -78,7 +78,7 @@ struct _PurpleSrvTxtQueryData {
gpointer extradata;
guint handle;
- int type;
+ PurpleDnsType type;
char *query;
#ifdef _WIN32
GThread *resolver;
@@ -94,7 +94,7 @@ struct _PurpleSrvTxtQueryData {
};
typedef struct _PurpleSrvInternalQuery {
- int type;
+ PurpleDnsType type;
char query[256];
} PurpleSrvInternalQuery;
@@ -254,7 +254,7 @@ purple_srv_sort(GList *list)
}
static PurpleSrvTxtQueryData *
-query_data_new(int type, gchar *query, gpointer extradata)
+query_data_new(PurpleDnsType type, gchar *query, gpointer extradata)
{
PurpleSrvTxtQueryData *query_data = g_new0(PurpleSrvTxtQueryData, 1);
query_data->type = type;
@@ -486,7 +486,7 @@ static void
resolved(gpointer data, gint source, PurpleInputCondition cond)
{
int size;
- int type;
+ PurpleDnsType type;
PurpleSrvTxtQueryData *query_data = (PurpleSrvTxtQueryData*)data;
int i;
int status;
@@ -647,7 +647,7 @@ static gpointer
res_thread(gpointer data)
{
PDNS_RECORD dr = NULL;
- int type;
+ PurpleDnsType type;
DNS_STATUS ds;
PurpleSrvTxtQueryData *query_data = data;
type = query_data->type;
@@ -1126,7 +1126,7 @@ purple_srv_txt_query_get_ui_ops(void)
return srv_txt_query_ui_ops;
}
-char *
+void *
purple_srv_txt_query_get_ui_data(PurpleSrvTxtQueryData *query_data)
{
g_return_val_if_fail(query_data != NULL, NULL);
@@ -1151,7 +1151,7 @@ purple_srv_txt_query_get_query(PurpleSrv
}
-int
+PurpleDnsType
purple_srv_txt_query_get_type(PurpleSrvTxtQueryData *query_data)
{
g_return_val_if_fail(query_data != NULL, 0);
diff --git a/libpurple/dnssrv.h b/libpurple/dnssrv.h
--- a/libpurple/dnssrv.h
+++ b/libpurple/dnssrv.h
@@ -30,10 +30,10 @@ typedef struct _PurpleTxtResponse Purple
#include <glib.h>
-enum PurpleDnsType {
+typedef enum {
PurpleDnsTypeTxt = 16,
PurpleDnsTypeSrv = 33
-};
+} PurpleDnsType;
struct _PurpleSrvResponse {
char hostname[256];
@@ -166,7 +166,7 @@ void purple_srv_txt_query_set_ui_ops(Pur
*/
PurpleSrvTxtQueryUiOps *purple_srv_txt_query_get_ui_ops(void);
-char *purple_srv_txt_query_get_ui_data(PurpleSrvTxtQueryData *query_data);
+void *purple_srv_txt_query_get_ui_data(PurpleSrvTxtQueryData *query_data);
void purple_srv_txt_query_set_ui_data(PurpleSrvTxtQueryData *query_data, void *ui_data);
@@ -185,7 +185,7 @@ char *purple_srv_txt_query_get_query(Pur
* @param query_data The query
* @return The query.
*/
-int purple_srv_txt_query_get_type(PurpleSrvTxtQueryData *query_data);
+PurpleDnsType purple_srv_txt_query_get_type(PurpleSrvTxtQueryData *query_data);
G_END_DECLS
More information about the Commits
mailing list