pidgin/pidgin

Parents b70ab10887a7
Children c73a687b16ba
Makefile cleanup, fix building with external libgadu, little synchronization of internal libgadu with upstream. Refs #343
--- a/libpurple/protocols/gg/Makefile.am Thu Jun 07 10:47:50 2012 +0000
+++ b/libpurple/protocols/gg/Makefile.am Fri Jun 08 16:47:57 2012 +0000
@@ -1,13 +1,18 @@
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
+
EXTRA_DIST = \
Makefile.mingw \
- resolver-purple.c \
- resolver-purple.h \
+ lib/COPYING
+
+if USE_INTERNAL_LIBGADU
+INTGGSOURCES = \
lib/common.c \
lib/compat.h \
- lib/COPYING \
+ lib/config.h \
lib/dcc.c \
lib/dcc7.c \
lib/debug.c \
+ lib/debug.h \
lib/deflate.c \
lib/deflate.h \
lib/encoding.c \
@@ -15,11 +20,9 @@
lib/events.c \
lib/handlers.c \
lib/http.c \
- lib/libgadu.h \
+ lib/internal.h \
lib/libgadu.c \
- lib/config.h \
- lib/debug.h \
- lib/internal.h \
+ lib/libgadu.h \
lib/message.c \
lib/message.h \
lib/obsolete.c \
@@ -31,38 +34,7 @@
lib/session.h \
lib/sha1.c
-pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
-
-if USE_INTERNAL_LIBGADU
-INTGGSOURCES = \
- lib/common.c \
- lib/compat.h \
- 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/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
-
-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 @@
$(INTGG_CFLAGS) \
$(GLIB_CFLAGS) \
$(DEBUG_CFLAGS)
-
--- a/libpurple/protocols/gg/gg.c Thu Jun 07 10:47:50 2012 +0000
+++ b/libpurple/protocols/gg/gg.c Fri Jun 08 16:47:57 2012 +0000
@@ -2332,24 +2332,19 @@
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 @@
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"),
--- a/libpurple/protocols/gg/lib/config.h Thu Jun 07 10:47:50 2012 +0000
+++ b/libpurple/protocols/gg/lib/config.h Fri Jun 08 16:47:57 2012 +0000
@@ -1,11 +1,10 @@
-/* Local libgadu configuration. */
-
-#ifndef __GG_LIBGADU_CONFIG_H
-#define __GG_LIBGADU_CONFIG_H
+/* Local libgadu configuration file. */
/* 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
--- a/libpurple/protocols/gg/lib/libgadu.c Thu Jun 07 10:47:50 2012 +0000
+++ b/libpurple/protocols/gg/lib/libgadu.c Fri Jun 08 16:47:57 2012 +0000
@@ -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.
*