Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: sanko/anyevent-msn
base: be41d522a8
...
head fork: sanko/anyevent-msn
compare: 7f864d9790
  • 6 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 22 additions and 22 deletions.
  1. +1 −2  examples/client.pl
  2. +21 −20 lib/AnyEvent/MSN.pm
3  examples/client.pl
View
@@ -74,9 +74,8 @@
on_fatal_error => sub {
my ($msn, $msg, $fatal) = @_;
warn sprintf 'Fatal error: ' . $msg;
- $reconnect_timer = AE::timer 30, 60, sub {
+ $reconnect_timer = AE::timer 30, 0, sub {
return $msn->connect if $msn->connected;
- $reconnect_timer = () if $msn->connected;
$cv->send;
}
}
41 lib/AnyEvent/MSN.pm
View
@@ -1,10 +1,10 @@
-package AnyEvent::MSN 0.001;
+package AnyEvent::MSN;
+{ $AnyEvent::MSN::VERSION = 0.002 }
{
use lib '../../lib';
use 5.012;
use Moose;
use Moose::Util::TypeConstraints;
- use MooseX::Params::Validate;
use AnyEvent qw[];
use AnyEvent::Handle qw[];
use AnyEvent::HTTP qw[];
@@ -282,21 +282,8 @@ package AnyEvent::MSN 0.001;
}
);
- # 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,
@@ -458,7 +445,7 @@ package AnyEvent::MSN 0.001;
# Reply to good challenge. Expect no body.
$s->_soap_request(
- 'https://contacts.msn.com:443/abservice/SharingService.asmx',
+ 'https://local-bay.contacts.msn.com/abservice/SharingService.asmx',
{ 'content-type' => 'text/xml; charset=utf-8',
SOAPAction =>
'"http://www.msn.com/webservices/AddressBook/FindMembership"'
@@ -499,7 +486,7 @@ XML
}
);
$s->_soap_request(
- 'https://contacts.msn.com/abservice/abservice.asmx',
+ 'https://local-bay.contacts.msn.com/abservice/abservice.asmx',
{ 'content-type' => 'text/xml; charset=utf-8',
SOAPAction =>
'"http://www.msn.com/webservices/AddressBook/ABFindContactsPaged"'
@@ -859,6 +846,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
@@ -975,7 +976,7 @@ XML
#
$s->_soap_request(
- 'https://contacts.msn.com/abservice/abservice.asmx',
+ 'https://local-bay.contacts.msn.com/abservice/abservice.asmx',
{ 'content-type' => 'text/xml; charset=utf-8',
SOAPAction =>
'"http://www.msn.com/webservices/AddressBook/ABContactAdd"'
@@ -1656,7 +1657,7 @@ CPAN ID: SANKO
=head1 License and Legal
-Copyright (C) 2011 by Sanko Robinson <sanko@cpan.org>
+Copyright (C) 2011-2012 by Sanko Robinson <sanko@cpan.org>
This program is free software; you can redistribute it and/or modify it under
the terms of

No commit comments for this range

Something went wrong with that request. Please try again.