/cpw/tomkiewicz/masterpassword: a0f9b38226eb: Better name for Cb...
Tomasz Wasilczyk
tomkiewicz at cpw.pidgin.im
Mon Mar 18 15:59:31 EDT 2013
Changeset: a0f9b38226eb29d0a7fbce8f7af386eebe7bc76b
Author: Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date: 2013-03-18 20:59 +0100
Branch: soc.2008.masterpassword
URL: https://hg.pidgin.im/cpw/tomkiewicz/masterpassword/rev/a0f9b38226eb
Description:
Better name for CbInfo, revert cosmetic changes not related to master password branch
diffstat:
libpurple/account.c | 47 ++++++++++++++--------------
libpurple/plugin.c | 2 +-
libpurple/protocols/gg/gg.c | 4 +-
libpurple/protocols/oscar/flap_connection.c | 1 -
4 files changed, 27 insertions(+), 27 deletions(-)
diffs (165 lines):
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -75,7 +75,7 @@ typedef struct
{
PurpleCallback cb;
gpointer data;
-} CbInfo;
+} PurpleCallbackBundle;
static PurpleAccountUiOps *account_ui_ops = NULL;
@@ -193,7 +193,8 @@ status_attr_to_xmlnode(const PurpleStatu
gboolean boolean_value = purple_value_get_boolean(attr_value);
if (boolean_value == purple_value_get_boolean(default_value))
return NULL;
- value = g_strdup(boolean_value ? "true" : "false");
+ value = g_strdup(boolean_value ?
+ "true" : "false");
}
else
{
@@ -1183,13 +1184,13 @@ purple_account_unregister_got_password_c
GError *error,
gpointer data)
{
- CbInfo *info = data;
+ PurpleCallbackBundle *cbb = data;
PurpleAccountUnregistrationCb cb;
- cb = (PurpleAccountUnregistrationCb)info->cb;
- _purple_connection_new_unregister(account, password, cb, info->data);
-
- g_free(info);
+ cb = (PurpleAccountUnregistrationCb)cbb->cb;
+ _purple_connection_new_unregister(account, password, cb, cbb->data);
+
+ g_free(cbb);
}
void
@@ -1204,18 +1205,18 @@ purple_account_register_completed(Purple
void
purple_account_unregister(PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data)
{
- CbInfo *info;
+ PurpleCallbackBundle *cbb;
g_return_if_fail(account != NULL);
purple_debug_info("account", "Unregistering account %s\n",
purple_account_get_username(account));
- info = g_new0(CbInfo, 1);
- info->cb = PURPLE_CALLBACK(cb);
- info->data = user_data;
-
- purple_keyring_get_password(account, purple_account_unregister_got_password_cb, info);
+ cbb = g_new0(PurpleCallbackBundle, 1);
+ cbb->cb = PURPLE_CALLBACK(cb);
+ cbb->data = user_data;
+
+ purple_keyring_get_password(account, purple_account_unregister_got_password_cb, cbb);
}
static void
@@ -1367,7 +1368,7 @@ gboolean
purple_account_is_disconnecting(const PurpleAccount *account)
{
g_return_val_if_fail(account != NULL, TRUE);
-
+
return account->disconnecting;
}
@@ -2253,7 +2254,7 @@ purple_account_get_password_async_finish
GError *error,
gpointer data)
{
- CbInfo *info = data;
+ PurpleCallbackBundle *cbb = data;
PurpleKeyringReadCallback cb;
purple_debug_info("account",
@@ -2264,11 +2265,11 @@ purple_account_get_password_async_finish
g_free(account->password);
account->password = g_strdup(password);
- cb = (PurpleKeyringReadCallback)info->cb;
+ cb = (PurpleKeyringReadCallback)cbb->cb;
if (cb != NULL)
- cb(account, password, error, info->data);
-
- g_free(info);
+ cb(account, password, error, cbb->data);
+
+ g_free(cbb);
}
void
@@ -2289,16 +2290,16 @@ purple_account_get_password(PurpleAccoun
cb(account, account->password, NULL, data);
} else {
- CbInfo *info = g_new0(CbInfo, 1);
- info->cb = PURPLE_CALLBACK(cb);
- info->data = data;
+ PurpleCallbackBundle *cbb = g_new0(PurpleCallbackBundle, 1);
+ cbb->cb = PURPLE_CALLBACK(cb);
+ cbb->data = data;
purple_debug_info("account",
"Reading password for account %s (%s) from async keyring.\n",
purple_account_get_username(account),
purple_account_get_protocol_id(account));
purple_keyring_get_password(account,
- purple_account_get_password_async_finish, info);
+ purple_account_get_password_async_finish, cbb);
}
}
diff --git a/libpurple/plugin.c b/libpurple/plugin.c
--- a/libpurple/plugin.c
+++ b/libpurple/plugin.c
@@ -1426,7 +1426,7 @@ purple_plugins_probe(const char *ext)
}
protocol_plugins = g_list_insert_sorted(protocol_plugins, plugin,
- (GCompareFunc)compare_prpl);
+ (GCompareFunc)compare_prpl);
}
}
#endif /* PURPLE_PLUGINS */
diff --git a/libpurple/protocols/gg/gg.c b/libpurple/protocols/gg/gg.c
--- a/libpurple/protocols/gg/gg.c
+++ b/libpurple/protocols/gg/gg.c
@@ -918,7 +918,7 @@ static void ggp_login(PurpleAccount *acc
GG_FEATURE_USER_DATA);
glp->async = 1;
-
+
encryption_type = purple_account_get_string(account, "encryption",
"opportunistic_tls");
purple_debug_info("gg", "Requested encryption type: %s\n",
@@ -941,7 +941,7 @@ static void ggp_login(PurpleAccount *acc
purple_debug_info("gg", "TLS mode: %d\n", glp->tls);
ggp_status_set_initial(gc, glp);
-
+
address = purple_account_get_string(account, "gg_server", "");
if (address && *address)
{
diff --git a/libpurple/protocols/oscar/flap_connection.c b/libpurple/protocols/oscar/flap_connection.c
--- a/libpurple/protocols/oscar/flap_connection.c
+++ b/libpurple/protocols/oscar/flap_connection.c
@@ -20,7 +20,6 @@
#include "oscar.h"
-#include "account.h"
#include "eventloop.h"
#include "proxy.h"
More information about the Commits
mailing list