Mercurial > pidgin.yaz
annotate src/protocols/msn/msnslp.c @ 6868:ab80de7a74d1
[gaim-migrate @ 7414]
Commitinating the current MSNSLP code. It's not working.. I don't know why.
No clients will respond to my messages, even though they appear very valid.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 17 Sep 2003 02:10:37 +0000 |
parents | bd433a45a463 |
children | ac638b90da44 |
rev | line source |
---|---|
6701 | 1 /** |
2 * @file msnslp.c MSNSLP support | |
3 * | |
4 * gaim | |
5 * | |
6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> | |
7 * | |
8 * This program is free software; you can redistribute it and/or modify | |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program; if not, write to the Free Software | |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 */ | |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
22 #include "msn.h" |
6701 | 23 #include "msnslp.h" |
24 | |
25 MsnSlpSession * | |
26 msn_slp_session_new(MsnSwitchBoard *swboard, gboolean local_initiated) | |
27 { | |
28 MsnSlpSession *slpsession; | |
29 | |
30 g_return_val_if_fail(swboard != NULL, NULL); | |
31 | |
32 slpsession = g_new0(MsnSlpSession, 1); | |
33 | |
34 slpsession->swboard = swboard; | |
35 slpsession->local_initiated = local_initiated; | |
36 | |
37 return slpsession; | |
38 } | |
39 | |
40 void | |
41 msn_slp_session_destroy(MsnSlpSession *session) | |
42 { | |
43 g_return_if_fail(session != NULL); | |
44 | |
45 g_free(session); | |
46 } | |
47 | |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
48 gboolean |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
49 msn_slp_session_msg_received(MsnSlpSession *slpsession, MsnMessage *msg) |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
50 { |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
51 const char *body; |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
52 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
53 g_return_val_if_fail(slpsession != NULL, TRUE); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
54 g_return_val_if_fail(msg != NULL, TRUE); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
55 g_return_val_if_fail(msg->msnslp_message, TRUE); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
56 g_return_val_if_fail(!strcmp(msn_message_get_content_type(msg), |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
57 "application/x-msnmsgrp2p"), TRUE); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
58 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
59 body = msn_message_get_body(msg); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
60 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
61 if (strlen(body) == 0) |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
62 { |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
63 /* ACK. Ignore it. */ |
6842
bd433a45a463
[gaim-migrate @ 7387]
Christian Hammond <chipx86@chipx86.com>
parents:
6831
diff
changeset
|
64 gaim_debug_info("msn", "Received MSNSLP ACK\n"); |
bd433a45a463
[gaim-migrate @ 7387]
Christian Hammond <chipx86@chipx86.com>
parents:
6831
diff
changeset
|
65 |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
66 return FALSE; |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
67 } |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
68 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
69 /* Now send an ack, since we got this. */ |
6868
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
70 msn_slp_session_send_ack(slpsession, msg); |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
71 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
72 return FALSE; |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
73 } |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
74 |
6868
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
75 static void |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
76 send_msg_part(MsnSlpSession *slpsession, MsnMessage *msg) |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
77 { |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
78 msg->msnslp_header.length = |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
79 (slpsession->orig_len - slpsession->offset > 1202 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
80 ? 1202 : slpsession->orig_len - slpsession->offset); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
81 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
82 if (slpsession->offset > 0) |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
83 { |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
84 if (msg->bin_content) |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
85 { |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
86 msn_message_set_bin_data(msg, |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
87 slpsession->orig_body + slpsession->offset, |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
88 msg->msnslp_header.length); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
89 } |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
90 else |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
91 { |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
92 msn_message_set_body(msg, |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
93 slpsession->orig_body + slpsession->offset); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
94 } |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
95 } |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
96 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
97 msg->msnslp_header.offset_1 = slpsession->offset; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
98 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
99 msn_switchboard_send_msg(slpsession->swboard, msg); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
100 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
101 if (slpsession->offset + msg->msnslp_header.length == slpsession->orig_len) |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
102 { |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
103 msn_message_destroy(msg); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
104 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
105 g_free(slpsession->orig_body); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
106 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
107 slpsession->offset = 0; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
108 slpsession->orig_len = 0; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
109 slpsession->orig_body = NULL; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
110 slpsession->outgoing_msg = NULL; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
111 } |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
112 else |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
113 slpsession->offset += msg->msnslp_header.length; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
114 } |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
115 |
6701 | 116 void |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
117 msn_slp_session_send_msg(MsnSlpSession *slpsession, MsnMessage *msg) |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
118 { |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
119 g_return_if_fail(slpsession != NULL); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
120 g_return_if_fail(msg != NULL); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
121 g_return_if_fail(msg->msnslp_message); |
6868
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
122 g_return_if_fail(slpsession->outgoing_msg == NULL); |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
123 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
124 msg->msnslp_header.session_id = slpsession->session_id; |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
125 |
6868
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
126 slpsession->outgoing_msg = msn_message_ref(msg); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
127 |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
128 if (slpsession->base_id == 0) |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
129 { |
6868
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
130 slpsession->base_id = rand() % 0x0FFFFFF0 + 4; |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
131 slpsession->prev_msg_id = slpsession->base_id; |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
132 } |
6868
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
133 else if (slpsession->offset == 0) |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
134 slpsession->prev_msg_id = ++slpsession->base_id; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
135 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
136 msg->msnslp_header.id = slpsession->prev_msg_id; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
137 // msg->msnslp_header.ack_session_id = rand() % 0xFFFFFF00; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
138 msg->msnslp_header.ack_session_id = 1980589; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
139 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
140 msn_message_set_charset(msg, NULL); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
141 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
142 if (msg->msnslp_header.session_id != 0) |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
143 msg->msnslp_footer.app_id = 1; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
144 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
145 if (msg->bin_content) |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
146 { |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
147 const void *temp; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
148 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
149 temp = msn_message_get_bin_data(msg, &slpsession->orig_len); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
150 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
151 slpsession->orig_body = g_memdup(temp, slpsession->orig_len); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
152 } |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
153 else |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
154 { |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
155 slpsession->orig_body = g_strdup(msn_message_get_body(msg)); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
156 slpsession->orig_len = strlen(slpsession->orig_body); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
157 } |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
158 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
159 msg->msnslp_header.total_size_1 = slpsession->orig_len; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
160 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
161 send_msg_part(slpsession, msg); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
162 } |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
163 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
164 void |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
165 msn_slp_session_send_ack(MsnSlpSession *slpsession, MsnMessage *acked_msg) |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
166 { |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
167 MsnMessage *msg; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
168 gboolean new_base_id = FALSE; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
169 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
170 g_return_if_fail(slpsession != NULL); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
171 g_return_if_fail(acked_msg != NULL); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
172 g_return_if_fail(acked_msg->msnslp_message); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
173 g_return_if_fail(slpsession->outgoing_msg == NULL); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
174 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
175 msg = msn_message_new_msnslp_ack(acked_msg); |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
176 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
177 if (slpsession->base_id == 0) |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
178 { |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
179 slpsession->base_id = rand() % 0x0FFFFE00 + 10; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
180 slpsession->prev_msg_id = slpsession->base_id; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
181 |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
182 new_base_id = TRUE; |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
183 } |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
184 else |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
185 slpsession->prev_msg_id = ++slpsession->base_id; |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
186 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
187 msg->msnslp_header.id = slpsession->prev_msg_id; |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
188 |
6868
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
189 if (new_base_id) |
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
190 slpsession->prev_msg_id -= 4; |
6827
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
191 |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
192 msn_switchboard_send_msg(slpsession->swboard, msg); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
193 } |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
194 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
195 void |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
196 msn_slp_session_request_user_display(MsnSlpSession *slpsession, |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
197 MsnUser *local_user, |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
198 MsnUser *remote_user, |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
199 const MsnObject *obj) |
6701 | 200 { |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
201 MsnMessage *invite_msg; |
6842
bd433a45a463
[gaim-migrate @ 7387]
Christian Hammond <chipx86@chipx86.com>
parents:
6831
diff
changeset
|
202 long session_id; |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
203 char *msnobj_data; |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
204 char *msnobj_base64; |
6827
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
205 char *branch; |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
206 char *call_id; |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
207 char *content; |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
208 char *body; |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
209 |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
210 g_return_if_fail(slpsession != NULL); |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
211 g_return_if_fail(local_user != NULL); |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
212 g_return_if_fail(remote_user != NULL); |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
213 g_return_if_fail(obj != NULL); |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
214 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
215 msnobj_data = msn_object_to_string(obj); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
216 msnobj_base64 = tobase64(msnobj_data, strlen(msnobj_data)); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
217 g_free(msnobj_data); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
218 |
6868
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
219 #if 0 |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
220 if ((c = strchr(msnobj_base64, '=')) != NULL) |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
221 *c = '\0'; |
6868
ab80de7a74d1
[gaim-migrate @ 7414]
Christian Hammond <chipx86@chipx86.com>
parents:
6842
diff
changeset
|
222 #endif |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
223 |
6842
bd433a45a463
[gaim-migrate @ 7387]
Christian Hammond <chipx86@chipx86.com>
parents:
6831
diff
changeset
|
224 session_id = rand() % 0xFFFFFF00 + 4; |
6827
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
225 |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
226 branch = g_strdup_printf("%4X%4X-%4X-%4X-%4X-%4X%4X%4X", |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
227 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
228 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
229 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
230 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
231 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
232 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
233 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
234 rand() % 0xAAFF + 0x1111); |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
235 |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
236 call_id = g_strdup_printf("%4X%4X-%4X-%4X-%4X-%4X%4X%4X", |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
237 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
238 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
239 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
240 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
241 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
242 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
243 rand() % 0xAAFF + 0x1111, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
244 rand() % 0xAAFF + 0x1111); |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
245 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
246 content = g_strdup_printf( |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
247 "EUF-GUID: {A4268EEC-FEC5-49E5-95C3-F126696BDBF6}\r\n" |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
248 "SessionID: %ld\r\n" |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
249 "AppID: 1\r\n" |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
250 "Context: %s", |
6842
bd433a45a463
[gaim-migrate @ 7387]
Christian Hammond <chipx86@chipx86.com>
parents:
6831
diff
changeset
|
251 session_id, |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
252 msnobj_base64); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
253 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
254 g_free(msnobj_base64); |
6701 | 255 |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
256 body = g_strdup_printf( |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
257 "INVITE MSNMSGR:%s MSNSLP/1.0\r\n" |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
258 "To: <msnmsgr:%s>\r\n" |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
259 "From: <msnmsgr:%s>\r\n" |
6827
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
260 "Via: MSNSLP/1.0/TLP ;branch={%s}\r\n" |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
261 "CSeq: 0\r\n" |
6827
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
262 "Call-ID: {%s}\r\n" |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
263 "Max-Forwards: 0\r\n" |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
264 "Content-Type: application/x-msnmsgr-sessionreqbody\r\n" |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
265 "Content-Length: %d\r\n" |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
266 "\r\n" |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
267 "%s" |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
268 "\r\n\r\n", |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
269 msn_user_get_passport(remote_user), |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
270 msn_user_get_passport(remote_user), |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
271 msn_user_get_passport(local_user), |
6827
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
272 branch, |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
273 call_id, |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
274 strlen(content) + 5, |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
275 content); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
276 |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
277 g_free(content); |
6827
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
278 g_free(branch); |
1cfbb731aa1f
[gaim-migrate @ 7372]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
279 g_free(call_id); |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
280 |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
281 gaim_debug_misc("msn", "Message = {%s}\n", body); |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
282 |
6831
a372cf34387e
[gaim-migrate @ 7376]
Christian Hammond <chipx86@chipx86.com>
parents:
6827
diff
changeset
|
283 invite_msg = msn_message_new_msnslp(); |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
284 |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
285 msn_message_set_sender(invite_msg, local_user); |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
286 msn_message_set_receiver(invite_msg, remote_user); |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
287 |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
288 msn_message_set_body(invite_msg, body); |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
289 |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
290 g_free(body); |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
291 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
292 msn_slp_session_send_msg(slpsession, invite_msg); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
293 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
294 msn_message_destroy(invite_msg); |
6701 | 295 } |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
296 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
297 gboolean |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
298 msn_p2p_msg(MsnServConn *servconn, MsnMessage *msg) |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
299 { |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
300 MsnSwitchBoard *swboard = servconn->data; |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
301 gboolean session_ended = FALSE; |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
302 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
303 if (swboard->slp_session == NULL) |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6786
diff
changeset
|
304 swboard->slp_session = msn_slp_session_new(swboard, FALSE); |
6786
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
305 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
306 session_ended = msn_slp_session_msg_received(swboard->slp_session, msg); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
307 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
308 if (session_ended) |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
309 msn_slp_session_destroy(swboard->slp_session); |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
310 |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
311 return FALSE; |
8efafdc38718
[gaim-migrate @ 7325]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
312 } |