~ubuntu-branches/ubuntu/hardy/pidgin/hardy

« back to all changes in this revision

Viewing changes to libpurple/protocols/msn/slplink.c

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2007-12-21 02:48:06 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071221024806-pd44a5k9tiyh12mp
Tags: 1:2.3.1-2ubuntu1
* Sync with Debian, remaining Ubuntu changes; (LP: #177811)
  - Set Maintainer to Ubuntu Core Developers.
  - Add build-deps on liblaunchpad-integration-dev, intltool,
    libnm-glib-dev (for --enable-nm) (Ubuntu #112720).
  - 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.
  - Ship compatibility symlinks via debian/gaim.links.
  - 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::.
   - Update debian/prefs.xml to set the notify plugin prefs
    /plugins/gtk/X11/notify/* and set /pidgin/plugins/loaded to load 
    the notify plugin; Ubuntu: #13389.
  - Add LPI integration patch, 02_lpi.
  - Add patch 04_let_crasher_for_apport to stop catching the SIGSEGV signal
    and let apport handle it.
  - Add patch 05_default_to_irc_ubuntu_com to set the default IRC 
    server to irc.ubuntu.com.
  - Add autoconf patch, 70_autoconf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
        char *tmp;
40
40
        char *dir;
41
41
        char *pload;
42
 
        FILE *tf;
43
42
        int c;
44
43
        gsize pload_size;
45
44
 
46
45
        dir = send ? "send" : "recv";
47
46
        c = send ? m_sc++ : m_rc++;
48
47
        tmp = g_strdup_printf("%s/msntest/%s/%03d", g_get_home_dir(), dir, c);
49
 
        tf = g_fopen(tmp, "wb");
50
 
        if (tf == NULL)
51
 
        {
52
 
                purple_debug_error("msn", "could not open debug file\n");
53
 
                return;
54
 
        }
55
48
        pload = msn_message_gen_payload(msg, &pload_size);
56
 
        fwrite(pload, 1, pload_size, tf);
57
 
        fclose(tf);
 
49
        if (!purple_util_write_data_to_file_absolute(tmp, pload, pload_size))
 
50
        {
 
51
                purple_debug_error("msn", "could not save debug file");
 
52
        }
58
53
        g_free(tmp);
59
54
}
60
55
#endif
112
107
        if (slplink->remote_user != NULL)
113
108
                g_free(slplink->remote_user);
114
109
 
 
110
#if 0
115
111
        if (slplink->directconn != NULL)
116
112
                msn_directconn_destroy(slplink->directconn);
 
113
#endif
117
114
 
118
115
        while (slplink->slp_calls != NULL)
119
116
                msn_slp_call_destroy(slplink->slp_calls->data);
120
117
 
 
118
        g_queue_free(slplink->slp_msg_queue);
 
119
 
121
120
        session->slplinks =
122
121
                g_list_remove(session->slplinks, slplink);
123
122
 
244
243
void
245
244
msn_slplink_send_msg(MsnSlpLink *slplink, MsnMessage *msg)
246
245
{
 
246
#if 0
247
247
        if (slplink->directconn != NULL)
248
248
        {
249
249
                msn_directconn_send_msg(slplink->directconn, msg);
250
250
        }
251
251
        else
 
252
#endif
252
253
        {
253
254
                if (slplink->swboard == NULL)
254
255
                {
634
635
                        MsnDirectConn *directconn;
635
636
 
636
637
                        directconn = slplink->directconn;
637
 
 
 
638
#if 0
638
639
                        if (!directconn->acked)
639
640
                                msn_directconn_send_handshake(directconn);
 
641
#endif
640
642
                }
641
643
                else if (slpmsg->flags == 0x0 || slpmsg->flags == 0x20 ||
642
644
                                 slpmsg->flags == 0x1000030)