/pidgin/main: d8aa47a78f55: Style: fix all remaining gg warnings
Tomasz Wasilczyk
twasilczyk at pidgin.im
Mon Feb 3 16:16:50 EST 2014
Changeset: d8aa47a78f55b59d9c703450461620b7050fda6e
Author: Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date: 2014-02-03 22:16 +0100
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/d8aa47a78f55
Description:
Style: fix all remaining gg warnings
diffstat:
libpurple/protocols/gg/oauth/oauth-purple.c | 8 ++++----
libpurple/protocols/gg/oauth/oauth.c | 13 +++++++++----
libpurple/protocols/gg/oauth/oauth.h | 4 +++-
3 files changed, 16 insertions(+), 9 deletions(-)
diffs (84 lines):
diff --git a/libpurple/protocols/gg/oauth/oauth-purple.c b/libpurple/protocols/gg/oauth/oauth-purple.c
--- a/libpurple/protocols/gg/oauth/oauth-purple.c
+++ b/libpurple/protocols/gg/oauth/oauth-purple.c
@@ -45,7 +45,7 @@ typedef struct
gpointer user_data;
gchar *token;
gchar *token_secret;
-
+
gchar *sign_method, *sign_url;
} ggp_oauth_data;
@@ -163,7 +163,7 @@ static void ggp_oauth_request_token_got(
req = purple_http_request_new("https://login.gadu-gadu.pl/authorize");
purple_http_request_set_max_len(req, GGP_OAUTH_RESPONSE_MAX);
- // we don't need any results, nor 302 redirection
+ /* we don't need any results, nor 302 redirection */
purple_http_request_set_max_redirects(req, 0);
purple_http_request_set_method(req, "POST");
purple_http_request_header_set(req, "Content-Type", "application/x-www-form-urlencoded");
@@ -254,10 +254,10 @@ static void ggp_oauth_access_token_got(P
{
PurpleAccount *account;
gchar *auth;
-
+
purple_debug_misc("gg", "ggp_oauth_access_token_got: "
"got access token, returning signed url\n");
-
+
account = purple_connection_get_account(data->gc);
auth = gg_oauth_generate_header(
data->sign_method, data->sign_url,
diff --git a/libpurple/protocols/gg/oauth/oauth.c b/libpurple/protocols/gg/oauth/oauth.c
--- a/libpurple/protocols/gg/oauth/oauth.c
+++ b/libpurple/protocols/gg/oauth/oauth.c
@@ -62,11 +62,14 @@ static gchar *gg_hmac_sha1(const char *k
g_object_unref(cipher);
g_object_unref(hash);
-
+
return purple_base64_encode(digest, sizeof(digest));
}
-static char *gg_oauth_generate_signature(const char *method, const char *url, const char *request, const char *consumer_secret, const char *token_secret)
+static char *
+gg_oauth_generate_signature(const char *method, const char *url,
+ const char *request, const char *consumer_secret,
+ const char *token_secret)
{
char *text, *key, *res;
gchar *url_e, *request_e, *consumer_secret_e, *token_secret_e;
@@ -92,7 +95,10 @@ static char *gg_oauth_generate_signature
return res;
}
-char *gg_oauth_generate_header(const char *method, const char *url, const char *consumer_key, const char *consumer_secret, const char *token, const char *token_secret)
+char *
+gg_oauth_generate_header(const char *method, const char *url,
+ const char *consumer_key, const char *consumer_secret,
+ const char *token, const char *token_secret)
{
char *request, *signature, *res;
char nonce[80], timestamp[16];
@@ -147,4 +153,3 @@ char *gg_oauth_generate_header(const cha
return res;
}
-
diff --git a/libpurple/protocols/gg/oauth/oauth.h b/libpurple/protocols/gg/oauth/oauth.h
--- a/libpurple/protocols/gg/oauth/oauth.h
+++ b/libpurple/protocols/gg/oauth/oauth.h
@@ -29,6 +29,8 @@
#include <internal.h>
#include <libgadu.h>
-char *gg_oauth_generate_header(const char *method, const char *url, const char *consumer_key, const char *consumer_secret, const char *token, const char *token_secret);
+char * gg_oauth_generate_header(const char *method, const char *url,
+ const char *consumer_key, const char *consumer_secret,
+ const char *token, const char *token_secret);
#endif /* _GGP_OAUTH_H */
More information about the Commits
mailing list