~ubuntu-branches/ubuntu/intrepid/pidgin/intrepid-security

« back to all changes in this revision

Viewing changes to libpurple/protocols/silc/ops.c

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2008-04-04 02:18:00 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080404021800-qaa00wom38gd7xus
Tags: 1:2.4.1-1ubuntu1
* Sync with Debian, remaining Ubuntu changes; (LP: #211769)
  - debian/control:
    + Set Maintainer to Ubuntu Core Developers.
    + Add build-deps on liblaunchpad-integration-dev, intltool,
      libnm-glib-dev (for --enable-nm)
    + Drop build-deps on libsilc-1.1-2-dev | libsilc-dev (>= 1.1.1) as
      this library is in universe.
    + Drop the libpurple0 recommends on libpurple-bin.
    + Add a gaim transitionnal package for upgrades.
    + Moved finch's libx11-6 dependency to Suggests
  - Ship compatibility symlinks via debian/gaim.links
  - debian/rules:
    + Pass --enable-nm to configure to enable NetworkManager support
    + Pass --disable-silc to configure to disable silc support even if
      it's installed in the build environment.
    + Add X-Ubuntu-Gettext-Domain to the desktop file and update the
      translation templates in common-install-impl::.
    + Added necessary arguments to dh_shlibdeps for finch
  - Update debian/prefs.xml to set the notify plugin prefs
    /plugins/gtk/X11/notify/* and set /pidgin/plugins/loaded to load
    the notify plugin
  - debian/patches:
    + 02_lpi for LP integration
    + 04_let_crasher_for_apport to stop catching the SIGSEGV signal
      and let apport handle it
    + 05_default_to_irc_ubuntu_com to set the default IRC
      server to irc.ubuntu.com.
    + 70_autoconf patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
void silc_say(SilcClient client, SilcClientConnection conn,
49
49
              SilcClientMessageType type, char *msg, ...)
50
50
{
51
 
        if (type == SILC_CLIENT_MESSAGE_ERROR) {
52
 
                char tmp[256];
53
 
                va_list va;
54
 
 
55
 
                va_start(va, msg);
56
 
                silc_vsnprintf(tmp, sizeof(tmp), msg, va);
 
51
        char tmp[256];
 
52
        va_list va;
 
53
        PurpleConnection *gc = NULL;
 
54
        PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_NETWORK_ERROR;
 
55
 
 
56
        va_start(va, msg);
 
57
        silc_vsnprintf(tmp, sizeof(tmp), msg, va);
 
58
        va_end(va);
 
59
 
 
60
        if (type != SILC_CLIENT_MESSAGE_ERROR) {
 
61
                purple_debug_misc("silc", "silc_say (%d) %s\n", type, tmp);
 
62
                return;
 
63
        }
 
64
 
 
65
        purple_debug_error("silc", "silc_say error: %s\n", tmp);
 
66
 
 
67
        if (!strcmp(tmp, "Authentication failed"))
 
68
                reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED;
 
69
 
 
70
        if (client != NULL)
 
71
                gc = client->application;
 
72
 
 
73
        if (gc != NULL)
 
74
                purple_connection_error_reason (gc, reason, tmp);
 
75
        else
57
76
                purple_notify_error(NULL, _("Error"), _("Error occurred"), tmp);
58
 
 
59
 
                va_end(va);
60
 
                return;
61
 
        }
62
77
}
63
78
 
64
79
/* Processes incoming MIME message.  Can be private message or channel