Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/yahoo_friend.c @ 19348:f0c4b4fdbd16
Add some additional yahoo keys to the stealth packets to make them work again. Fixes #2654.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 21 Aug 2007 04:58:58 +0000 |
parents | 32c366eeeb99 |
children | 44b4e8bd759b |
comparison
equal
deleted
inserted
replaced
19347:e159cee53085 | 19348:f0c4b4fdbd16 |
---|---|
194 YahooPresenceVisibility presence) | 194 YahooPresenceVisibility presence) |
195 { | 195 { |
196 struct yahoo_data *yd = gc->proto_data; | 196 struct yahoo_data *yd = gc->proto_data; |
197 struct yahoo_packet *pkt = NULL; | 197 struct yahoo_packet *pkt = NULL; |
198 YahooFriend *f; | 198 YahooFriend *f; |
199 const char *thirtyone, *thirteen; | |
200 int service = -1; | |
199 | 201 |
200 if (!yd->logged_in) | 202 if (!yd->logged_in) |
201 return; | 203 return; |
202 | 204 |
203 f = yahoo_friend_find(gc, name); | 205 f = yahoo_friend_find(gc, name); |
209 purple_debug_info("yahoo", "Not setting presence because there are no changes.\n"); | 211 purple_debug_info("yahoo", "Not setting presence because there are no changes.\n"); |
210 return; | 212 return; |
211 } | 213 } |
212 | 214 |
213 if (presence == YAHOO_PRESENCE_PERM_OFFLINE) { | 215 if (presence == YAHOO_PRESENCE_PERM_OFFLINE) { |
214 pkt = yahoo_packet_new(YAHOO_SERVICE_PRESENCE_PERM, | 216 service = YAHOO_SERVICE_PRESENCE_PERM; |
215 YAHOO_STATUS_AVAILABLE, yd->session_id); | 217 thirtyone = "1"; |
216 | 218 thirteen = "2"; |
217 yahoo_packet_hash(pkt, "ssss", | |
218 1, purple_connection_get_display_name(gc), | |
219 31, "1", 13, "2", 7, name); | |
220 } else if (presence == YAHOO_PRESENCE_DEFAULT) { | 219 } else if (presence == YAHOO_PRESENCE_DEFAULT) { |
221 if (f->presence == YAHOO_PRESENCE_PERM_OFFLINE) { | 220 if (f->presence == YAHOO_PRESENCE_PERM_OFFLINE) { |
222 pkt = yahoo_packet_new(YAHOO_SERVICE_PRESENCE_PERM, | 221 service = YAHOO_SERVICE_PRESENCE_PERM; |
223 YAHOO_STATUS_AVAILABLE, yd->session_id); | 222 thirtyone = "2"; |
224 | 223 thirteen = "2"; |
225 yahoo_packet_hash(pkt, "ssss", | |
226 1, purple_connection_get_display_name(gc), | |
227 31, "2", 13, "2", 7, name); | |
228 } else if (yd->current_status == YAHOO_STATUS_INVISIBLE) { | 224 } else if (yd->current_status == YAHOO_STATUS_INVISIBLE) { |
229 pkt = yahoo_packet_new(YAHOO_SERVICE_PRESENCE_SESSION, | 225 service = YAHOO_SERVICE_PRESENCE_SESSION; |
230 YAHOO_STATUS_AVAILABLE, yd->session_id); | 226 thirtyone = "2"; |
231 yahoo_packet_hash(pkt, "ssss", | 227 thirteen = "1"; |
232 1, purple_connection_get_display_name(gc), | |
233 31, "2", 13, "1", 7, name); | |
234 } | 228 } |
235 } else if (presence == YAHOO_PRESENCE_ONLINE) { | 229 } else if (presence == YAHOO_PRESENCE_ONLINE) { |
236 if (f->presence == YAHOO_PRESENCE_PERM_OFFLINE) { | 230 if (f->presence == YAHOO_PRESENCE_PERM_OFFLINE) { |
237 pkt = yahoo_packet_new(YAHOO_SERVICE_PRESENCE_PERM, | 231 pkt = yahoo_packet_new(YAHOO_SERVICE_PRESENCE_PERM, |
238 YAHOO_STATUS_AVAILABLE, yd->session_id); | 232 YAHOO_STATUS_AVAILABLE, yd->session_id); |
239 yahoo_packet_hash(pkt, "ssss", | 233 yahoo_packet_hash(pkt, "ssssssss", |
240 1, purple_connection_get_display_name(gc), | 234 1, purple_connection_get_display_name(gc), |
241 31, "2", 13, "2", 7, name); | 235 31, "2", 13, "2", |
236 302, "319", 300, "319", | |
237 7, name, | |
238 301, "319", 303, "319"); | |
242 yahoo_packet_send_and_free(pkt, yd); | 239 yahoo_packet_send_and_free(pkt, yd); |
243 } | 240 } |
244 | 241 |
245 pkt = yahoo_packet_new(YAHOO_SERVICE_PRESENCE_SESSION, | 242 service = YAHOO_SERVICE_PRESENCE_SESSION; |
243 thirtyone = "1"; | |
244 thirteen = "1"; | |
245 } | |
246 | |
247 if (service > 0) { | |
248 pkt = yahoo_packet_new(service, | |
246 YAHOO_STATUS_AVAILABLE, yd->session_id); | 249 YAHOO_STATUS_AVAILABLE, yd->session_id); |
247 yahoo_packet_hash(pkt, "ssss", | 250 |
251 yahoo_packet_hash(pkt, "ssssssss", | |
248 1, purple_connection_get_display_name(gc), | 252 1, purple_connection_get_display_name(gc), |
249 31, "1", 13, "1", 7, name); | 253 31, thirtyone, 13, thirteen, |
250 } | 254 302, "319", 300, "319", |
251 | 255 7, name, |
252 if (pkt) | 256 301, "319", 303, "319"); |
257 | |
253 yahoo_packet_send_and_free(pkt, yd); | 258 yahoo_packet_send_and_free(pkt, yd); |
254 } | 259 } |
260 } |