Skip to content
Browse files

Wait for version negotiation before sending client info

  • Loading branch information...
1 parent e8c5eaf commit e5da05eb2f813a623884d64cb1e3e382ed7c54ff @sanko committed
Showing with 15 additions and 14 deletions.
  1. +15 −14 lib/AnyEvent/MSN.pm
View
29 lib/AnyEvent/MSN.pm
@@ -283,21 +283,8 @@ package AnyEvent::MSN;
}
);
- # Send version negotiation and basic client info
+ # Send version negotiation
$s->send('VER %d %s CVR0', $s->tid, $s->protocol_version);
- $s->send('CVR %d %s %s %s %s %s %s %s %s%s',
- $s->tid,
- $s->locale_id,
- $s->os_type,
- $s->os_ver,
- $s->arch,
- $s->client_name,
- $s->client_version,
- $s->client_string,
- $s->passport,
- (' ' . ($s->_has_redirect ? $s->redirect : ' 0')
- )
- );
# Schedule first PNG in two mins
$s->_set_ping_timer(AE::timer 120,
@@ -860,6 +847,20 @@ XML
sub _handle_packet_ver { # Negotiated protocol version
my ($s, $tid, $r) = @_;
$s->_set_protocol_version($r);
+
+ # Send basic client info
+ $s->send('CVR %d %s %s %s %s %s %s %s %s%s',
+ $s->tid,
+ $s->locale_id,
+ $s->os_type,
+ $s->os_ver,
+ $s->arch,
+ $s->client_name,
+ $s->client_version,
+ $s->client_string,
+ $s->passport,
+ (' ' . ($s->_has_redirect ? $s->redirect : ' 0'))
+ );
}
sub _handle_packet_xfr { # Transver to another switchboard

0 comments on commit e5da05e

Please sign in to comment.
Something went wrong with that request. Please try again.