soc.2012.gg: 17b85e67: Makefile cleanup, fix building with exte...
tomkiewicz at cpw.pidgin.im
tomkiewicz at cpw.pidgin.im
Fri Jun 8 12:52:06 EDT 2012
----------------------------------------------------------------------
Revision: 17b85e67663cf56b263f2bd107e5edbb73d5ace8
Parent: 2b9913aaf462a241a7d454bf9ea96f156daf76da
Author: tomkiewicz at cpw.pidgin.im
Date: 06/08/12 12:47:57
Branch: im.pidgin.soc.2012.gg
URL: http://d.pidgin.im/viewmtn/revision/info/17b85e67663cf56b263f2bd107e5edbb73d5ace8
Changelog:
Makefile cleanup, fix building with external libgadu, little synchronization of internal libgadu with upstream. Refs #343
Changes against parent 2b9913aaf462a241a7d454bf9ea96f156daf76da
patched libpurple/protocols/gg/Makefile.am
patched libpurple/protocols/gg/gg.c
patched libpurple/protocols/gg/lib/config.h
patched libpurple/protocols/gg/lib/libgadu.c
-------------- next part --------------
============================================================
--- libpurple/protocols/gg/Makefile.am 92f14838ba026d32c3b88e65f34e5ddb5fea37ed
+++ libpurple/protocols/gg/Makefile.am 452c49a55e55def9a27c97f8d330988d65b246a7
@@ -1,45 +1,18 @@
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
+
EXTRA_DIST = \
Makefile.mingw \
- resolver-purple.c \
- resolver-purple.h \
- lib/common.c \
- lib/compat.h \
- lib/COPYING \
- lib/dcc.c \
- lib/dcc7.c \
- lib/debug.c \
- lib/deflate.c \
- lib/deflate.h \
- lib/encoding.c \
- lib/encoding.h \
- lib/events.c \
- lib/handlers.c \
- lib/http.c \
- lib/libgadu.h \
- lib/libgadu.c \
- lib/config.h \
- lib/debug.h \
- lib/internal.h \
- lib/message.c \
- lib/message.h \
- lib/obsolete.c \
- lib/protocol.h \
- lib/pubdir.c \
- lib/pubdir50.c \
- lib/resolver.c \
- lib/resolver.h \
- lib/session.h \
- lib/sha1.c
+ lib/COPYING
-pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
-
if USE_INTERNAL_LIBGADU
INTGGSOURCES = \
lib/common.c \
lib/compat.h \
+ lib/config.h \
lib/dcc.c \
lib/dcc7.c \
lib/debug.c \
+ lib/debug.h \
lib/deflate.c \
lib/deflate.h \
lib/encoding.c \
@@ -47,10 +20,9 @@ INTGGSOURCES = \
lib/events.c \
lib/handlers.c \
lib/http.c \
- lib/libgadu.h \
+ lib/internal.h \
lib/libgadu.c \
- lib/config.h \
- lib/internal.h \
+ lib/libgadu.h \
lib/message.c \
lib/message.h \
lib/obsolete.c \
@@ -62,7 +34,7 @@ INTGGSOURCES = \
lib/session.h \
lib/sha1.c
-INTGG_CFLAGS = -I$(top_srcdir)/libpurple/protocols/gg/lib -DGG_IGNORE_DEPRECATED -DUSE_INTERNAL_LIBGADU
+INTGG_CFLAGS = -I$(top_srcdir)/libpurple/protocols/gg/lib -DGG_IGNORE_DEPRECATED
endif
if USE_GNUTLS
@@ -113,4 +85,3 @@ AM_CPPFLAGS = \
$(INTGG_CFLAGS) \
$(GLIB_CFLAGS) \
$(DEBUG_CFLAGS)
-
============================================================
--- libpurple/protocols/gg/gg.c ce72c0ebf7addc72304d660d17ce2f0c3c8f481d
+++ libpurple/protocols/gg/gg.c 1e5e8b1e93b96d0b64210449284834c88b871e5b
@@ -2332,24 +2332,19 @@ static void ggp_login(PurpleAccount *acc
glp->status = glp->status|GG_STATUS_FRIENDS_MASK;
address = purple_account_get_string(account, "gg_server", "");
- if (address && *address) {
- /* TODO: Make this non-blocking */
- struct in_addr *addr = gg_gethostbyname(address);
-
- purple_debug_info("gg", "Using gg server given by user (%s)\n", address);
-
- if (addr == NULL) {
- gchar *tmp = g_strdup_printf(_("Unable to resolve hostname '%s': %s"),
- address, g_strerror(errno));
+ if (address && *address)
+ {
+ glp->server_addr = inet_addr(address);
+ glp->server_port = 8074;
+
+ if (glp->server_addr == INADDR_NONE)
+ {
purple_connection_error(gc,
- PURPLE_CONNECTION_ERROR_NETWORK_ERROR, /* should this be a settings error? */
- tmp);
- g_free(tmp);
+ PURPLE_CONNECTION_ERROR_INVALID_SETTINGS,
+ _("Provided server IP address is not valid"));
+ g_free(glp);
return;
}
-
- glp->server_addr = inet_addr(inet_ntoa(*addr));
- glp->server_port = 8074;
} else
purple_debug_info("gg", "Trying to retrieve address from gg appmsg service\n");
@@ -2970,7 +2965,7 @@ static void init_plugin(PurplePlugin *pl
PurpleAccountOption *option;
GList *encryption_options = NULL;
- purple_debug_info("gg", "init_plugin: [libgadu version: %s]\n",
+ purple_debug_info("gg", "Loading Gadu-Gadu plugin with libgadu %s...\n",
gg_libgadu_version());
option = purple_account_option_string_new(_("GG server"),
============================================================
--- libpurple/protocols/gg/lib/config.h 6f2ed1279770b395e5119ae166c15430fc0d9723
+++ libpurple/protocols/gg/lib/config.h 5c24394513b37d59d767c29e2cceb7568496d057
@@ -1,11 +1,10 @@
-/* Local libgadu configuration. */
+/* Local libgadu configuration file. */
-#ifndef __GG_LIBGADU_CONFIG_H
-#define __GG_LIBGADU_CONFIG_H
-
/* libpurple's config */
#include <config.h>
+#define GG_LIBGADU_VERSION "1.11.1"
+
/* Defined if libgadu was compiled for bigendian machine. */
#undef GG_CONFIG_BIGENDIAN
#ifdef WORDS_BIGENDIAN
@@ -76,8 +75,3 @@
#ifdef HAVE_SYS_TYPES_H
# define GG_CONFIG_HAVE_SYS_TYPES_H
#endif
-
-
-#define vnsprintf g_vnsprintf
-
-#endif
============================================================
--- libpurple/protocols/gg/lib/libgadu.c b9fed113016e21d124962020d869744000873ac2
+++ libpurple/protocols/gg/lib/libgadu.c 6f0f342e544ff098ec0c2747d09b3adf9dbb8510
@@ -60,8 +60,6 @@
# include <openssl/rand.h>
#endif
-#define GG_LIBGADU_VERSION "1.11.1"
-
/**
* Port gniazda nas?uchuj?cego dla po??cze? bezpo?rednich.
*
More information about the Commits
mailing list