~prateek.karandikar/ubuntu/precise/pidgin/add_quicklist

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Micah Gersten
  • Date: 2011-04-11 03:27:22 UTC
  • mfrom: (2.3.17 sid)
  • Revision ID: james.westby@ubuntu.com-20110411032722-farsw08i6ouj5dnd
Tags: 1:2.7.11-1ubuntu1
* Merge from Debian unstable (LP: #757146), remaining changes:
  + debian/control:
    - Add libtool and liblaunchpad-integration-dev build depends
    - Bump standards version
    - Relax binary depends on pidgin versions
    - Add pidgin-libnotify as Recommends for pidgin binary
    - Fix description of pidgin binary
    - Don't have libpurple-bin depend on libpurple0
  + debian/libpurple0.symbols: add epoch to appropriate symbols
  + Add debian/patches:
    - 02_lpi.patch
    - 04_let_crasher_for_apport.patch
    - 05_default_to_irc_ubuntu_com.patch
    - 10_docklet_default_off.patch
    - 11_buddy_list_really_show.patch
    - 13_sounds_and_timers.patch
    - 60_1024x600_gtkpounce.c.patch
    - 60_1024x600_gtkprefs.c.patch
  + debian/prefs.xml: add notification prefs
  + debian/rules:
    - Add translation domain to desktop file with gettext
    - Add the launcher for pidgin

* Add configure check for launchpad integration attached to the gtk check since 
  upstream dropped the startup notification check which is where this check was 
  previously
  - update debian/patches/02_lpi.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
511
511
                /* File Transfer */
512
512
                PurpleAccount *account;
513
513
                PurpleXfer *xfer;
514
 
                MsnFileContext *header;
 
514
                MsnFileContext *file_context;
515
515
                char *buf;
516
516
                gsize bin_len;
517
517
                guint32 file_size;
528
528
                                                         slpcall->slplink->remote_user);
529
529
 
530
530
                buf = (char *)purple_base64_decode(context, &bin_len);
531
 
                header = msn_file_context_from_wire(buf, bin_len);
532
 
 
533
 
                if (header != NULL) {
534
 
                        file_size = header->file_size;
535
 
 
536
 
                        file_name = g_convert((const gchar *)&header->file_name,
 
531
                file_context = msn_file_context_from_wire(buf, bin_len);
 
532
 
 
533
                if (file_context != NULL) {
 
534
                        file_size = file_context->file_size;
 
535
 
 
536
                        file_name = g_convert((const gchar *)&file_context->file_name,
537
537
                                              MAX_FILE_NAME_LEN * 2,
538
538
                                              "UTF-8", "UTF-16LE",
539
539
                                              NULL, NULL, NULL);
554
554
 
555
555
                        xfer->data = slpcall;
556
556
 
557
 
                        if (header->preview) {
558
 
                                purple_xfer_set_thumbnail(xfer, header->preview,
559
 
                                                          header->preview_len,
 
557
                        if (file_context->preview) {
 
558
                                purple_xfer_set_thumbnail(xfer, file_context->preview,
 
559
                                                          file_context->preview_len,
560
560
                                                                          "image/png");
561
 
                                g_free(header->preview);
 
561
                                g_free(file_context->preview);
562
562
                        }
563
563
 
564
564
                        purple_xfer_request(xfer);
565
565
                }
566
 
                g_free(header);
 
566
                g_free(file_context);
567
567
                g_free(buf);
568
568
 
569
569
                accepted = TRUE;
1059
1059
        MsnSlpCall *slpcall;
1060
1060
        const guchar *body;
1061
1061
        gsize body_len;
 
1062
        guint32 session_id;
 
1063
        guint32 flags;
1062
1064
 
1063
1065
        slpcall = NULL;
1064
1066
        body = slpmsg->buffer;
1065
 
        body_len = slpmsg->header->offset;
1066
 
 
1067
 
        if (slpmsg->header->flags == P2P_NO_FLAG || slpmsg->header->flags == P2P_WLM2009_COMP)
 
1067
        body_len = msn_p2p_info_get_offset(slpmsg->p2p_info);
 
1068
 
 
1069
        session_id = msn_p2p_info_get_session_id(slpmsg->p2p_info);
 
1070
        flags = msn_p2p_info_get_flags(slpmsg->p2p_info);
 
1071
 
 
1072
        if (flags == P2P_NO_FLAG || flags == P2P_WLM2009_COMP)
1068
1073
        {
1069
1074
                char *body_str;
1070
1075
 
1071
 
                if (slpmsg->header->session_id == 64)
 
1076
                if (session_id == 64)
1072
1077
                {
1073
1078
                        /* This is for handwritten messages (Ink) */
1074
1079
                        GError *error = NULL;
1125
1130
                }
1126
1131
                g_free(body_str);
1127
1132
        }
1128
 
         else if (msn_p2p_msg_is_data(slpmsg->header->flags))
 
1133
         else if (msn_p2p_msg_is_data(flags))
1129
1134
        {
1130
 
                slpcall = msn_slplink_find_slp_call_with_session_id(slplink, slpmsg->header->session_id);
 
1135
                slpcall = msn_slplink_find_slp_call_with_session_id(slplink, session_id);
1131
1136
 
1132
1137
                if (slpcall != NULL)
1133
1138
                {
1142
1147
                        slpcall->wasted = TRUE;
1143
1148
                }
1144
1149
        }
1145
 
#if 0
1146
 
        else if (slpmsg->header->flags == 0x100)
1147
 
        {
1148
 
                slpcall = slplink->directconn->initial_call;
1149
 
 
1150
 
                if (slpcall != NULL)
1151
 
                        msn_slpcall_session_init(slpcall);
1152
 
        }
1153
 
#endif
1154
 
        else if (slpmsg->header->flags == P2P_ACK)
 
1150
        else if (flags == P2P_ACK)
1155
1151
        {
1156
1152
                /* Acknowledgement of previous message. Don't do anything currently. */
1157
1153
        }
1158
1154
        else
1159
1155
                purple_debug_warning("msn", "Unprocessed SLP message with flags 0x%04x\n",
1160
 
                                     slpmsg->header->flags);
 
1156
                                     flags);
1161
1157
 
1162
1158
        return slpcall;
1163
1159
}