Skip to content

Commit

Permalink
Import 2.6.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
felipec committed Jul 17, 2010
1 parent 46c444e commit dce54f0
Show file tree
Hide file tree
Showing 173 changed files with 13,764 additions and 1,483 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = purple.pc

SUBDIRS = $(GCONF_DIR) plugins protocols tests . example
SUBDIRS = $(GCONF_DIR) plugins protocols . tests example

purple_coresources = \
account.c \
Expand Down
15 changes: 14 additions & 1 deletion account.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,9 +1050,22 @@ purple_account_destroy(PurpleAccount *account)
if(account->system_log)
purple_log_free(account->system_log);

while (account->deny) {
g_free(account->deny->data);
account->deny = g_slist_delete_link(account->deny, account->deny);
}

while (account->permit) {
g_free(account->permit->data);
account->permit = g_slist_delete_link(account->permit, account->permit);
}

priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
PURPLE_DBUS_UNREGISTER_POINTER(priv->current_error);
g_free(priv->current_error);
if (priv->current_error) {
g_free(priv->current_error->description);
g_free(priv->current_error);
}
g_free(priv);

PURPLE_DBUS_UNREGISTER_POINTER(account);
Expand Down
16 changes: 6 additions & 10 deletions blist.c
Original file line number Diff line number Diff line change
Expand Up @@ -2009,17 +2009,13 @@ void purple_blist_add_group(PurpleGroup *group, PurpleBlistNode *node)

ops = purple_blist_get_ui_ops();

if (!purplebuddylist->root) {
purplebuddylist->root = gnode;

key = g_utf8_collate_key(group->name, -1);
g_hash_table_insert(groups_cache, key, group);
return;
}

/* if we're moving to overtop of ourselves, do nothing */
if (gnode == node)
return;
if (gnode == node) {
if (!purplebuddylist->root)
node = NULL;
else
return;
}

if (purple_find_group(group->name)) {
/* This is just being moved */
Expand Down
6 changes: 2 additions & 4 deletions certificate.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/

#include <glib.h>

#include "internal.h"
#include "certificate.h"
#include "dbus-maybe.h"
Expand Down Expand Up @@ -97,8 +95,8 @@ invalidity_reason_to_string(PurpleCertificateInvalidityFlags flag)
"automatically checked.");
break;
case PURPLE_CERTIFICATE_CA_UNKNOWN:
return _("The root certificate this one claims to be issued by is "
"unknown to Pidgin.");
return _("The certificate is not trusted because no certificate "
"that can verify it is currently trusted.");
break;
case PURPLE_CERTIFICATE_NOT_ACTIVATED:
return _("The certificate is not valid yet.");
Expand Down
4 changes: 0 additions & 4 deletions cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#include <glib.h>
#include <string.h>
#include <stdio.h>

#include "internal.h"
#include "cipher.h"
#include "dbus-maybe.h"
Expand Down
2 changes: 0 additions & 2 deletions cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
*
*/

#include <string.h>

#include "internal.h"

#include "account.h"
Expand Down
11 changes: 2 additions & 9 deletions connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,16 @@ static gboolean
send_keepalive(gpointer data)
{
PurpleConnection *gc = data;
PurplePluginProtocolInfo *prpl_info = NULL;

if (gc == NULL)
return TRUE;
PurplePluginProtocolInfo *prpl_info;

/* Only send keep-alives if we haven't heard from the
* server in a while.
*/
if ((time(NULL) - gc->last_received) < KEEPALIVE_INTERVAL)
return TRUE;

if (gc->prpl == NULL)
return TRUE;

prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);

if (prpl_info && prpl_info->keepalive)
if (prpl_info->keepalive)
prpl_info->keepalive(gc);

return TRUE;
Expand Down
23 changes: 15 additions & 8 deletions dbus-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@
#define DBUS_API_SUBJECT_TO_CHANGE
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/* Allow the code below to see deprecated functions, so we can continue to
* export them via DBus. */
#undef PURPLE_DISABLE_DEPRECATED

#include "internal.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "account.h"
#include "blist.h"
#include "conversation.h"
Expand All @@ -42,7 +44,6 @@
#include "dbus-bindings.h"
#include "debug.h"
#include "core.h"
#include "internal.h"
#include "savedstatuses.h"
#include "smiley.h"
#include "util.h"
Expand Down Expand Up @@ -126,8 +127,10 @@ purple_dbus_pointer_to_id(gconstpointer node)
gint id = GPOINTER_TO_INT(g_hash_table_lookup(map_node_id, node));
if ((id == 0) && (node != NULL))
{
purple_debug_warning("dbus",
"Need to register an object with the dbus subsystem. (If you are not a developer, please ignore this message.)\n");
if (purple_debug_is_verbose())
purple_debug_warning("dbus",
"Need to register an object with the dbus subsystem."
" (If you are not a developer, please ignore this message.)\n");
return 0;
}
return id;
Expand Down Expand Up @@ -795,7 +798,11 @@ purple_dbus_signal_emit_purple(const char *name, int num_values,
dbus_message_iter_init_append(signal, &iter);

if (purple_dbus_message_append_purple_values(&iter, num_values, values, vargs))
purple_debug_warning("dbus", "The signal \"%s\" caused some dbus error. (If you are not a developer, please ignore this message.)\n", name);
if (purple_debug_is_verbose())
purple_debug_warning("dbus",
"The signal \"%s\" caused some dbus error."
" (If you are not a developer, please ignore this message.)\n",
name);

dbus_connection_send(purple_dbus_connection, signal, NULL);

Expand Down
2 changes: 1 addition & 1 deletion debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#include "debug.h"
#include "internal.h"
#include "debug.h"
#include "prefs.h"
#include "util.h"

Expand Down
2 changes: 1 addition & 1 deletion desktopitem.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@
* Boston, MA 02111-1301, USA.
*/

#include "internal.h"
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "desktopitem.h"
#include "internal.h"

struct _PurpleDesktopItem {
int refcount;
Expand Down
18 changes: 9 additions & 9 deletions dnsquery.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ resolve_ip(PurpleDnsQueryData *query_data)
return FALSE;
}

#ifdef USE_IDN
static gboolean
dns_str_is_ascii(const char *name)
{
Expand All @@ -183,6 +184,7 @@ dns_str_is_ascii(const char *name)

return TRUE;
}
#endif

#if defined(PURPLE_DNSQUERY_USE_FORK)

Expand Down Expand Up @@ -293,12 +295,11 @@ purple_dnsquery_resolver_run(int child_out, int child_in, gboolean show_debug)
rc = purple_network_convert_idn_to_ascii(dns_params.hostname, &hostname);
if (rc != 0) {
write_to_parent(child_out, &rc, sizeof(rc));
close(child_out);
if (show_debug)
fprintf(stderr, "dns[%d] Error: IDN conversion returned "
"%d\n", getpid(), rc);
dns_params.hostname[0] = '\0';
continue;
break;
}
} else /* intentional to execute the g_strdup */
#endif
Expand All @@ -323,12 +324,13 @@ purple_dnsquery_resolver_run(int child_out, int child_in, gboolean show_debug)
rc = getaddrinfo(hostname, servname, &hints, &res);
write_to_parent(child_out, &rc, sizeof(rc));
if (rc != 0) {
close(child_out);
if (show_debug)
printf("dns[%d] Error: getaddrinfo returned %d\n",
getpid(), rc);
dns_params.hostname[0] = '\0';
continue;
g_free(hostname);
hostname = NULL;
break;
}
tmp = res;
while (res) {
Expand Down Expand Up @@ -774,11 +776,8 @@ dns_thread(gpointer data)
if (!dns_str_is_ascii(query_data->hostname)) {
rc = purple_network_convert_idn_to_ascii(query_data->hostname, &hostname);
if (rc != 0) {
/* FIXME: Dirty 2.6.0 string freeze hack */
char tmp[8];
g_snprintf(tmp, sizeof(tmp), "%d", rc);
query_data->error_message = g_strdup_printf(_("Error resolving %s:\n%s"),
query_data->hostname, tmp);
query_data->error_message = g_strdup_printf(_("Error converting %s "
"to punycode: %d"), query_data->hostname, rc);
/* back to main thread */
purple_timeout_add(0, dns_main_thread_cb, query_data);
return 0;
Expand Down Expand Up @@ -951,6 +950,7 @@ resolve_host(gpointer data)
g_snprintf(message, sizeof(message), _("Error resolving %s: %d"),
query_data->hostname, h_errno);
purple_dnsquery_failed(query_data, message);
g_free(hostname);
return FALSE;
}
memset(&sin, 0, sizeof(struct sockaddr_in));
Expand Down
5 changes: 5 additions & 0 deletions dnsquery.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
#include "eventloop.h"
#include "account.h"

/**
* An opaque structure representing a DNS query. The hostname and port
* associated with the query can be retrieved using
* purple_dnsquery_get_host() and purple_dnsquery_get_port().
*/
typedef struct _PurpleDnsQueryData PurpleDnsQueryData;

/**
Expand Down
Loading

0 comments on commit dce54f0

Please sign in to comment.