/soc/2013/ankitkv/gobjectification: 768de721115c: Merged default...
Ankit Vani
a at nevitus.org
Thu Feb 6 06:24:49 EST 2014
Changeset: 768de721115cb8e9090140fefcc2a0c9cba2a992
Author: Ankit Vani <a at nevitus.org>
Date: 2014-02-06 16:50 +0530
Branch: gtkdoc-conversion
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/768de721115c
Description:
Merged default branch
diffstat:
configure.ac | 2 +-
libpurple/dnssrv.c | 4 +-
libpurple/internal.h | 10 -
libpurple/plugins/ssl/ssl-nss.c | 42 +
libpurple/protocols/msn/msg.c | 67 +-
pidgin/gtkdialogs.c | 62 +-
po/README | 2 +-
po/hy.po | 14192 ---------------------------
po/kk.po | 19750 ++++++++++++++++++++++++++++++++++++++
po/lo.po | 14191 ---------------------------
po/ms_MY.po | 14153 ---------------------------
11 files changed, 19855 insertions(+), 42620 deletions(-)
diffs (truncated from 62677 to 300 lines):
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -305,7 +305,7 @@ if test x$enable_i18n = xyes; then
GETTEXT_PACKAGE=pidgin
AC_SUBST(GETTEXT_PACKAGE)
- ALL_LINGUAS="af am ar ast az be at latin bg bn bn_IN bs ca ca at valencia cs da de dz el en_AU en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu hy id it ja ka km kn ko ku lo lt mai mhr mk mn mr ms_MY my_MM nb ne nl nn oc or pa pl pt_BR pt ps ro ru si sk sl sq sr sr at latin sv sw ta te th tr uk ur vi xh zh_CN zh_HK zh_TW"
+ ALL_LINGUAS="af am ar ast az be at latin bg bn bn_IN bs ca ca at valencia cs da de dz el en_AU en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id it ja ka kk km kn ko ku lt mai mhr mk mn mr my_MM nb ne nl nn oc or pa pl pt_BR pt ps ro ru si sk sl sq sr sr at latin sv sw ta te th tr uk ur vi xh zh_CN zh_HK zh_TW"
AM_GLIB_GNU_GETTEXT
dnl If we don't have msgfmt, then po/ is going to fail -- ensure that
diff --git a/libpurple/dnssrv.c b/libpurple/dnssrv.c
--- a/libpurple/dnssrv.c
+++ b/libpurple/dnssrv.c
@@ -742,7 +742,7 @@ purple_srv_resolve(PurpleAccount *accoun
proxy_type = purple_proxy_info_get_type(
purple_proxy_get_setup(account));
if (proxy_type == PURPLE_PROXY_TOR) {
- purple_debug_info("dnssrv", "Aborting SRV lookup in Tor Proxy mode.");
+ purple_debug_info("dnssrv", "Aborting SRV lookup in Tor Proxy mode.\n");
cb(NULL, 0, extradata);
return NULL;
}
@@ -862,7 +862,7 @@ PurpleSrvTxtQueryData *purple_txt_resolv
proxy_type = purple_proxy_info_get_type(
purple_proxy_get_setup(account));
if (proxy_type == PURPLE_PROXY_TOR) {
- purple_debug_info("dnssrv", "Aborting TXT lookup in Tor Proxy mode.");
+ purple_debug_info("dnssrv", "Aborting TXT lookup in Tor Proxy mode.\n");
cb(NULL, extradata);
return NULL;
}
diff --git a/libpurple/internal.h b/libpurple/internal.h
--- a/libpurple/internal.h
+++ b/libpurple/internal.h
@@ -125,16 +125,6 @@
#endif
#include <glib.h>
-
-/* This wasn't introduced until Glib 2.14 :( */
-#ifndef G_MAXSSIZE
-# if GLIB_SIZEOF_LONG == 8
-# define G_MAXSSIZE ((gssize) 0x7fffffffffffffff)
-# else
-# define G_MAXSSIZE ((gssize) 0x7fffffff)
-# endif
-#endif
-
#include <glib/gstdio.h>
#ifdef _WIN32
diff --git a/libpurple/plugins/ssl/ssl-nss.c b/libpurple/plugins/ssl/ssl-nss.c
--- a/libpurple/plugins/ssl/ssl-nss.c
+++ b/libpurple/plugins/ssl/ssl-nss.c
@@ -266,6 +266,46 @@ ssl_nss_get_peer_certificates(PRFileDesc
return peer_certs;
}
+/*
+ * Ideally this information would be exposed to the UI somehow, but for now we
+ * just print it to the debug log
+ */
+static void
+printSecurityInfo(PRFileDesc *fd)
+{
+ SECStatus result;
+ SSLChannelInfo channel;
+ SSLCipherSuiteInfo suite;
+
+ result = SSL_GetChannelInfo(fd, &channel, sizeof channel);
+ if (result == SECSuccess && channel.length == sizeof channel
+ && channel.cipherSuite) {
+ result = SSL_GetCipherSuiteInfo(channel.cipherSuite,
+ &suite, sizeof suite);
+
+ if (result == SECSuccess) {
+ purple_debug_info("nss", "SSL version %d.%d using "
+ "%d-bit %s with %d-bit %s MAC\n"
+ "Server Auth: %d-bit %s, "
+ "Key Exchange: %d-bit %s, "
+ "Compression: %s\n"
+ "Cipher Suite Name: %s\n",
+ channel.protocolVersion >> 8,
+ channel.protocolVersion & 0xff,
+ suite.effectiveKeyBits,
+ suite.symCipherName,
+ suite.macBits,
+ suite.macAlgorithmName,
+ channel.authKeyBits,
+ suite.authAlgorithmName,
+ channel.keaKeyBits, suite.keaTypeName,
+ channel.compressionMethodName,
+ suite.cipherSuiteName);
+ }
+ }
+}
+
+
static void
ssl_nss_handshake_cb(gpointer data, int fd, PurpleInputCondition cond)
{
@@ -293,6 +333,8 @@ ssl_nss_handshake_cb(gpointer data, int
return;
}
+ printSecurityInfo(nss_data->in);
+
purple_input_remove(nss_data->handshake_handler);
nss_data->handshake_handler = 0;
diff --git a/libpurple/protocols/msn/msg.c b/libpurple/protocols/msn/msg.c
--- a/libpurple/protocols/msn/msg.c
+++ b/libpurple/protocols/msn/msg.c
@@ -323,37 +323,30 @@ msn_message_new_from_cmd(MsnSession *ses
char *
msn_message_gen_payload(MsnMessage *msg, size_t *ret_size)
{
+ GString *payload;
GList *l;
- char *n, *base, *end;
- int len;
- size_t body_len = 0;
+ size_t body_len;
const void *body;
g_return_val_if_fail(msg != NULL, NULL);
- len = MSN_BUF_LEN;
+ /* 8192 is a reasonable guess at a large enough buffer to avoid realloc */
+ payload = g_string_sized_new(8192);
- base = n = end = g_malloc(len + 1);
- end += len;
-
- /* Standard header. */
- if (msg->charset == NULL)
- {
- g_snprintf(n, len,
- "MIME-Version: 1.0\r\n"
- "Content-Type: %s\r\n",
- msg->content_type);
- }
- else
- {
- g_snprintf(n, len,
- "MIME-Version: 1.0\r\n"
- "Content-Type: %s; charset=%s\r\n",
- msg->content_type, msg->charset);
+ /* Standard header */
+ if (msg->charset == NULL) {
+ g_string_append_printf(payload,
+ "MIME-Version: 1.0\r\n"
+ "Content-Type: %s\r\n",
+ msg->content_type);
+ } else {
+ g_string_append_printf(payload,
+ "MIME-Version: 1.0\r\n"
+ "Content-Type: %s; charset=%s\r\n",
+ msg->content_type, msg->charset);
}
- n += strlen(n);
-
+ /* Headers */
for (l = msg->header_list; l != NULL; l = l->next)
{
const char *key;
@@ -362,31 +355,25 @@ msn_message_gen_payload(MsnMessage *msg,
key = l->data;
value = msn_message_get_header_value(msg, key);
- g_snprintf(n, end - n, "%s: %s\r\n", key, value);
- n += strlen(n);
+ g_string_append_printf(payload, "%s: %s\r\n", key, value);
}
- if ((end - n) > 2)
- n += g_strlcpy(n, "\r\n", end - n);
+ /* End of headers */
+ g_string_append(payload, "\r\n");
+ /* Body */
body = msn_message_get_bin_data(msg, &body_len);
-
- if (body != NULL && (size_t)(end - n) > body_len)
- {
- memcpy(n, body, body_len);
- n += body_len;
- *n = '\0';
+ if (body != NULL) {
+ g_string_append_len(payload, body, body_len);
}
- if (ret_size != NULL)
- {
- *ret_size = n - base;
-
- if (*ret_size > 1664)
- *ret_size = 1664;
+ if (ret_size != NULL) {
+ /* Use MIN to truncate the payload to 1664 bytes? Why do we do this?
+ It seems like it will lead to brokenness. */
+ *ret_size = MIN(payload->len, 1664);
}
- return base;
+ return g_string_free(payload, FALSE);
}
void
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -166,8 +166,7 @@ static const struct translator translato
{N_("Valencian-Catalan"), "ca at valencia", "Toni Hermoso", "toniher at softcatala.org"},
{NULL, NULL, "Josep Puigdemont", "tradgnome at softcatala.org"},
{N_("Czech"), "cs", "David Vachulka", "david at konstrukce-cad.com"},
- {N_("Danish"), "da", "Peter Bach", "bach.peter at gmail.com"},
- {NULL, NULL, "Morten Brix Pedersen", "morten at wtf.dk"},
+ {N_("Danish"), "da", "Nicky Thomassen", "nicky at aptget.dk"},
{N_("German"), "de", "Björn Voigt", "bjoernv at arcor.de"},
{N_("Dzongkha"), "dz", "Norbu", "nor_den at hotmail.com"},
{NULL, NULL, "Jurmey Rabgay", "jur_gay at yahoo.com"},
@@ -187,7 +186,7 @@ static const struct translator translato
{N_("Finnish"), "fi", "Timo Jyrinki", "timo.jyrinki at iki.fi"},
{N_("French"), "fr", "Ãric Boumaour", "zongo_fr at users.sourceforge.net"},
{N_("Irish"), "ga", "Aaron Kearns", "ajkearns6 at gmail.com"},
- {N_("Irish"), "ga", "Kevin Scannell", "NULL"},
+ {N_("Irish"), "ga", "Kevin Scannell", NULL},
{N_("Galician"), "gl", "Mar Castro", "mariamarcp at gmail.com"},
{NULL, NULL, "Frco. Javier Rial", "fjrial at cesga.es"},
{N_("Gujarati"), "gu", "Ankit Patel", "ankit_patel at users.sf.net"},
@@ -197,18 +196,17 @@ static const struct translator translato
{NULL, NULL, "Rajesh Ranjan", "rajeshkajha at yahoo.com"},
{N_("Croatian"), "hr", "Sabina DrempetiÄ", "bina91991 at googlemail.com"},
{N_("Hungarian"), "hu", "Kelemen Gábor", "kelemeng at gnome.hu"},
- {N_("Armenian"), "hy", "David Avsharyan", "avsharyan at gmail.com"},
{N_("Indonesian"), "id", "Rai S. Regawa", "raireg at yahoo.com"},
{N_("Italian"), "it", "Claudio Satriano", "satriano at gmail.com"},
{N_("Japanese"), "ja", "Takayuki Kusano", "AE5T-KSN at asahi-net.or.jp"},
{N_("Georgian"), "ka", N_("Ubuntu Georgian Translators"), "alexander.didebulidze at stusta.mhn.de"},
+ {N_("Kazakh"), "kk", "Baurzhan Muftakhidinov", "baurthefirst at gmail.com"},
{N_("Khmer"), "km", "Khoem Sokhem", "khoemsokhem at khmeros.info"},
{N_("Kannada"), "kn", N_("Kannada Translation team"), "translation at sampada.info"},
{N_("Korean"), "ko", "Sushizang", "sushizang at empal.com"},
{N_("Kurdish"), "ku", "Amed Ã. Jiyan", "amedcj at hotmail.com"},
{NULL, NULL, "Erdal Ronahi", "erdal.ronahi at gmail.com"},
{NULL, NULL, "Rizoyê Xerzî", "rizoxerzi at hotmail.com"},
- {N_("Lao"), "lo", "Anousak Souphavah", "anousak at gmail.com"},
{N_("Lithuanian"), "lt", "Algimantas MargeviÄius", "margevicius.algimantas at gmail.com"},
{N_("Maithili"), "mai", "Sangeeta Kumari", "sangeeta_0975 at yahoo.com"},
{NULL, NULL, "Rajesh Ranjan", "rajeshkajha at yahoo.com"},
@@ -219,7 +217,6 @@ static const struct translator translato
{N_("Malayalam"), "ml", "Ani Peter", "apeter at redhat.com"},
{N_("Mongolian"), "mn", "gooyo", NULL},
{N_("Marathi"), "mr", "Sandeep Shedmake", "sandeep.shedmake at gmail.com"},
- {N_("Malay"), "ms_MY", "Muhammad Najmi bin Ahmad Zabidi", "najmi.zabidi at gmail.com"},
{N_("Burmese"), "my_MM", "Thura Hlaing", "trhura at gmail.com"},
{N_("Bokmål Norwegian"), "nb", "Hans Fredrik Nordhaug", "hans at nordhaug.priv.no"},
{N_("Nepali"), "ne", "Shyam Krishna Bal", NULL},
@@ -264,24 +261,26 @@ static const struct translator translato
static const struct translator past_translators[] = {
{N_("Amharic"), "am", "Daniel Yacob", NULL},
- {N_("Arabic"), "ar", "Mohamed Magdy", "alnokta at yahoo.com"},
+ {N_("Arabic"), "ar", "Mohamed Magdy", NULL},
{N_("Bulgarian"), "bg", "Hristo Todorov", NULL},
- {N_("Bengali"), "bn", "Indranil Das Gupta", "indradg at l2c2.org"},
- {NULL, NULL, "Tisa Nafisa", "tisa_nafisa at yahoo.com"},
+ {N_("Bengali"), "bn", "Indranil Das Gupta", NULL},
+ {NULL, NULL, "Tisa Nafisa", NULL},
{N_("Catalan"), "ca", "JM Pérez Cáncer", NULL},
{NULL, NULL, "Robert Millan", NULL},
{N_("Czech"), "cs", "Honza Král", NULL},
- {NULL, NULL, "Miloslav Trmac", "mitr at volny.cz"},
+ {NULL, NULL, "Miloslav Trmac", NULL},
+ {N_("Danish"), "da", "Peter Bach", NULL},
+ {NULL, NULL, "Morten Brix Pedersen", NULL},
{N_("German"), "de", "Daniel Seifert", NULL},
{NULL, NULL, "Karsten Weiss", NULL},
- {NULL, NULL, "Jochen Kemnade", "jochenkemnade at web.de"},
- {N_("British English"), "en_GB", "Luke Ross", "luke at lukeross.name"},
+ {NULL, NULL, "Jochen Kemnade", NULL},
+ {N_("British English"), "en_GB", "Luke Ross", NULL},
{N_("Spanish"), "es", "JM Pérez Cáncer", NULL},
{NULL, NULL, "Nicolás Lichtmaier", NULL},
{NULL, NULL, "Amaya Rodrigo", NULL},
{NULL, NULL, "Alejandro G Villar", NULL},
- {N_("Basque"), "eu", "Iñaki Larrañaga Murgoitio", "dooteo at zundan.com"},
- {NULL, NULL, "Hizkuntza Politikarako Sailburuordetza", "hizkpol at ej-gv.es"},
+ {N_("Basque"), "eu", "Iñaki Larrañaga Murgoitio", NULL},
+ {NULL, NULL, "Hizkuntza Politikarako Sailburuordetza", NULL},
{N_("Finnish"), "fi", "Arto Alakulju", NULL},
{NULL, NULL, "Tero Kuusela", NULL},
{N_("French"), "fr", "Sébastien François", NULL},
@@ -292,6 +291,7 @@ static const struct translator past_tran
{N_("Hebrew"), "he", "Pavel Bibergal", NULL},
{N_("Hindi"), "hi", "Ravishankar Shrivastava", NULL},
More information about the Commits
mailing list