Mercurial > pidgin
comparison libpurple/protocols/msn/p2p.c @ 31568:50ca9e64186b
Only send acks on p2pv2 when required.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 07 May 2011 07:49:25 +0000 |
parents | 968103d932d6 |
children | eb1bbaae3427 |
comparison
equal
deleted
inserted
replaced
31567:968103d932d6 | 31568:50ca9e64186b |
---|---|
405 default: | 405 default: |
406 purple_debug_error("msn", "Invalid P2P Info version: %d\n", old_info->version); | 406 purple_debug_error("msn", "Invalid P2P Info version: %d\n", old_info->version); |
407 } | 407 } |
408 } | 408 } |
409 | 409 |
410 gboolean | |
411 msn_p2p_info_require_ack(MsnP2PInfo *info) | |
412 { | |
413 gboolean ret = FALSE; | |
414 | |
415 switch (info->version) { | |
416 case MSN_P2P_VERSION_ONE: { | |
417 guint32 flags = msn_p2p_info_get_flags(info); | |
418 | |
419 ret = flags == P2P_NO_FLAG || flags == P2P_WLM2009_COMP || | |
420 msn_p2p_msg_is_data(flags); | |
421 break; | |
422 } | |
423 | |
424 case MSN_P2P_VERSION_TWO: | |
425 ret = (info->header.v2.opcode & P2P_OPCODE_RAK) > 0; | |
426 break; | |
427 | |
428 default: | |
429 purple_debug_error("msn", "Invalid P2P Info version: %d\n", info->version); | |
430 } | |
431 | |
432 return ret; | |
433 } | |
434 | |
410 guint32 | 435 guint32 |
411 msn_p2p_info_get_session_id(MsnP2PInfo *info) | 436 msn_p2p_info_get_session_id(MsnP2PInfo *info) |
412 { | 437 { |
413 guint32 session_id = 0; | 438 guint32 session_id = 0; |
414 | 439 |