soc.2012.gg: 3fa4537f: Update libgadu to 1.11.1
tomkiewicz at cpw.pidgin.im
tomkiewicz at cpw.pidgin.im
Fri May 25 16:43:04 EDT 2012
----------------------------------------------------------------------
Revision: 3fa4537f3ab13ea082d468da8f8ca6162b31948e
Parent: 04dd9b27f1bb9e7ef162fb6243e8c9e896b57f16
Author: tomkiewicz at cpw.pidgin.im
Date: 05/25/12 16:36:26
Branch: im.pidgin.soc.2012.gg
URL: http://d.pidgin.im/viewmtn/revision/info/3fa4537f3ab13ea082d468da8f8ca6162b31948e
Changelog:
Update libgadu to 1.11.1
Changes against parent 04dd9b27f1bb9e7ef162fb6243e8c9e896b57f16
patched configure.ac
patched libpurple/protocols/gg/lib/deflate.h
patched libpurple/protocols/gg/lib/encoding.c
patched libpurple/protocols/gg/lib/events.c
patched libpurple/protocols/gg/lib/internal.h
patched libpurple/protocols/gg/lib/libgadu.c
patched libpurple/protocols/gg/lib/resolver.c
-------------- next part --------------
============================================================
--- configure.ac a62adbdac456cb3929ec94be1e0d9094e16d9d79
+++ configure.ac 7b2e35f5b0505f663a997341293415cca702c23f
@@ -1024,7 +1024,7 @@ if test "x$gadu_manual_check" = "xno"; t
gadu_manual_check="no"
fi
if test "x$gadu_manual_check" = "xno"; then
- PKG_CHECK_MODULES(GADU, [libgadu >= 1.11.0], [
+ PKG_CHECK_MODULES(GADU, [libgadu >= 1.11.1], [
gadu_includes="yes"
gadu_libs="yes"
], [
@@ -1058,7 +1058,7 @@ if test "x$gadu_libs" = "xyes"; then
]])], [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
#if GG_DEFAULT_PROTOCOL_VERSION < 0x2e
-#error "Your libgadu version is too old. libpurple requires 1.11.0 or higher."
+#error "Your libgadu version is too old. libpurple requires 1.11.1 or higher."
#endif
]])], [
AC_MSG_RESULT(yes)
@@ -1069,7 +1069,7 @@ if test "x$gadu_libs" = "xyes"; then
echo
echo
echo "Your supplied copy of libgadu is too old."
- echo "Install version 1.11.0 or newer."
+ echo "Install version 1.11.1 or newer."
echo "Then rerun this ./configure"
echo
echo "Falling back to using our own copy of libgadu"
============================================================
--- libpurple/protocols/gg/lib/events.c 6497cfa187ec6d0a8257fbb4af157a157ec84565
+++ libpurple/protocols/gg/lib/events.c e086543d1b8642b02abb68f5144791cb4a599a7f
@@ -1,4 +1,4 @@
-/* $Id: events.c 1105 2011-05-25 21:34:50Z wojtekka $ */
+/* $Id: events.c 1144 2011-07-09 15:43:00Z wojtekka $ */
/*
* (C) Copyright 2001-2006 Wojtek Kaniewski <wojtekka at irc.pl>
@@ -806,14 +806,14 @@ gnutls_handshake_repeat:
const gnutls_datum_t *peers;
gnutls_x509_crt_t cert;
- if (gnutls_x509_crt_init(&cert) >= 0) {
+ if (gnutls_x509_crt_init(&cert) == 0) {
peers = gnutls_certificate_get_peers(GG_SESSION_GNUTLS(sess), &peer_count);
if (peers != NULL) {
char buf[256];
size_t size;
- if (gnutls_x509_crt_import(cert, &peers[0], GNUTLS_X509_FMT_DER) >= 0) {
+ if (gnutls_x509_crt_import(cert, &peers[0], GNUTLS_X509_FMT_DER) == 0) {
size = sizeof(buf);
gnutls_x509_crt_get_dn(cert, buf, &size);
gg_debug_session(sess, GG_DEBUG_MISC, "// cert subject: %s\n", buf);
@@ -822,6 +822,8 @@ gnutls_handshake_repeat:
gg_debug_session(sess, GG_DEBUG_MISC, "// cert issuer: %s\n", buf);
}
}
+
+ gnutls_x509_crt_deinit(cert);
}
}
============================================================
--- libpurple/protocols/gg/lib/libgadu.c 660938af19e11f9bb0dd80e098c2f439736df3fc
+++ libpurple/protocols/gg/lib/libgadu.c b9fed113016e21d124962020d869744000873ac2
@@ -1,4 +1,4 @@
-/* $Id: libgadu.c 1102 2011-05-05 21:17:57Z wojtekka $ */
+/* $Id: libgadu.c 1245 2012-01-10 22:48:31Z wojtekka $ */
/*
* (C) Copyright 2001-2010 Wojtek Kaniewski <wojtekka at irc.pl>
@@ -60,7 +60,7 @@
# include <openssl/rand.h>
#endif
-#define GG_LIBGADU_VERSION "1.11.0"
+#define GG_LIBGADU_VERSION "1.11.1"
/**
* Port gniazda nas?uchuj?cego dla po??cze? bezpo?rednich.
@@ -132,7 +132,7 @@ __attribute__ ((unused))
#ifdef __GNUC__
__attribute__ ((unused))
#endif
-= "$Id: libgadu.c 1102 2011-05-05 21:17:57Z wojtekka $";
+= "$Id: libgadu.c 1245 2012-01-10 22:48:31Z wojtekka $";
#endif
#endif /* DOXYGEN */
@@ -149,7 +149,7 @@ const char *gg_libgadu_version()
return GG_LIBGADU_VERSION;
}
-#ifdef GG_CONFIG_HAVE_UINT64_T
+#ifdef HAVE_UINT64_T
/**
* \internal Zamienia kolejno?? bajt?w w 64-bitowym s?owie.
*
@@ -178,7 +178,7 @@ uint64_t gg_fix64(uint64_t x)
((x & (uint64_t) 0xff00000000000000ULL) >> 56));
#endif
}
-#endif /* GG_CONFIG_HAVE_UINT64_T */
+#endif /* HAVE_UINT64_T */
/**
* \internal Zamienia kolejno?? bajt?w w 32-bitowym s?owie.
@@ -443,11 +443,11 @@ int gg_write(struct gg_session *sess, co
res = written;
}
} else {
- res = 0;
-
if (sess->send_buf == NULL) {
res = gg_write_common(sess, buf, length);
+ if (res == -1 && errno == EAGAIN)
+ res = 0;
if (res == -1)
return -1;
}
@@ -1112,18 +1112,6 @@ void gg_logoff(struct gg_session *sess)
sess->fd = -1;
}
-#ifdef GG_CONFIG_HAVE_GNUTLS
- if (sess->ssl != NULL) {
- gg_session_gnutls_t *tmp;
-
- tmp = (gg_session_gnutls_t*) sess->ssl;
- gnutls_deinit(tmp->session);
- gnutls_certificate_free_credentials(tmp->xcred);
- gnutls_global_deinit();
- free(sess->ssl);
- }
-#endif
-
if (sess->send_buf) {
free(sess->send_buf);
sess->send_buf = NULL;
@@ -1155,6 +1143,18 @@ void gg_free_session(struct gg_session *
free(sess->recv_buf);
free(sess->header_buf);
+#ifdef GG_CONFIG_HAVE_GNUTLS
+ if (sess->ssl != NULL) {
+ gg_session_gnutls_t *tmp;
+
+ tmp = (gg_session_gnutls_t*) sess->ssl;
+ gnutls_deinit(tmp->session);
+ gnutls_certificate_free_credentials(tmp->xcred);
+ gnutls_global_deinit();
+ free(sess->ssl);
+ }
+#endif
+
#ifdef GG_CONFIG_HAVE_OPENSSL
if (sess->ssl)
SSL_free(sess->ssl);
============================================================
--- libpurple/protocols/gg/lib/internal.h 8c0f7de7a28784227ce20dd846fdb8a2d9ff2101
+++ libpurple/protocols/gg/lib/internal.h 9d7f47b85f335bf1ceba6f2c91538ab7ded84231
@@ -22,6 +22,7 @@
#define LIBGADU_INTERNAL_H
#include "libgadu.h"
+#include "config.h"
struct gg_dcc7_relay {
uint32_t addr;
============================================================
--- libpurple/protocols/gg/lib/resolver.c 1360fbb37c933b5e7d4f9d2707b9af85e409c436
+++ libpurple/protocols/gg/lib/resolver.c 8a6934adae87fb0f6b6d80867a44e1954e4a0fd3
@@ -234,7 +234,7 @@ int gg_gethostbyname_real(const char *ho
/* Kopiuj */
for (i = 0; he->h_addr_list[i] != NULL; i++)
- memcpy(&((*result)[i]), he->h_addr_list[0], sizeof(struct in_addr));
+ memcpy(&((*result)[i]), he->h_addr_list[i], sizeof(struct in_addr));
(*result)[i].s_addr = INADDR_NONE;
@@ -265,6 +265,7 @@ static int gg_resolver_run(int fd, const
if ((addr_ip[0].s_addr = inet_addr(hostname)) == INADDR_NONE) {
if (gg_gethostbyname_real(hostname, &addr_list, &addr_count, 1) == -1) {
addr_list = addr_ip;
+ addr_count = 0;
/* addr_ip[0] ju? zawiera INADDR_NONE */
}
} else {
@@ -375,7 +376,7 @@ static int gg_resolver_fork_start(int *f
status = (gg_resolver_run(pipes[1], hostname) == -1) ? 1 : 0;
-#ifdef GG_CONFIG_HAVE__EXIT
+#ifdef HAVE__EXIT
_exit(status);
#else
exit(status);
============================================================
--- libpurple/protocols/gg/lib/encoding.c 151c59ca64dc1c83755e882ab90f6e04ea35d952
+++ libpurple/protocols/gg/lib/encoding.c 6860fe4cdc44036f9b492b79ca5115171146cfe8
@@ -35,22 +35,22 @@ static const uint16_t table_cp1250[] =
*/
static const uint16_t table_cp1250[] =
{
- 0x20ac, '?', 0x201a, '?', 0x201e, 0x2026, 0x2020, 0x2021,
- '?', 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179,
- '?', 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
- '?', 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a,
- 0x00a0, 0x02c7, 0x02d8, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7,
- 0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b,
- 0x00b0, 0x00b1, 0x02db, 0x0142, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
- 0x00b8, 0x0105, 0x015f, 0x00bb, 0x013d, 0x02dd, 0x013e, 0x017c,
- 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7,
- 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e,
- 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7,
- 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df,
- 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7,
- 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
- 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7,
- 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9,
+ 0x20ac, '?', 0x201a, '?', 0x201e, 0x2026, 0x2020, 0x2021,
+ '?', 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179,
+ '?', 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
+ '?', 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a,
+ 0x00a0, 0x02c7, 0x02d8, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7,
+ 0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b,
+ 0x00b0, 0x00b1, 0x02db, 0x0142, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
+ 0x00b8, 0x0105, 0x015f, 0x00bb, 0x013d, 0x02dd, 0x013e, 0x017c,
+ 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7,
+ 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e,
+ 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7,
+ 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df,
+ 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7,
+ 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
+ 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7,
+ 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9,
};
/**
@@ -136,11 +136,8 @@ static char *gg_encoding_convert_utf8_cp
uint32_t uc = 0, uc_min = 0;
for (i = 0, len = 0; (src[i] != 0) && (i < src_length); i++) {
- if ((src[i] & 0xc0) == 0xc0) {
+ if ((src[i] & 0xc0) != 0x80)
len++;
- } else if ((src[i] & 0x80) == 0x00) {
- len++;
- }
}
if ((dst_length != -1) && (len > dst_length))
============================================================
--- libpurple/protocols/gg/lib/deflate.h 392439e640bfde845d8ee0b31687905f3da1dc5b
+++ libpurple/protocols/gg/lib/deflate.h 524f7c41674efa254cc265402119a3be79eda11e
@@ -1,7 +1,7 @@
/* $Id$ */
/*
- * (C) Copyright 2009 Jakub Zawadzki <darkjames at darkjames.ath.cx>
+ * (C) Copyright 2011 Bartosz Brachaczek <b.brachaczek at gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License Version
More information about the Commits
mailing list