r9543 - in /trunk/libnet-sip-perl: Changes META.yml debian/changelog lib/Net/SIP.pm lib/Net/SIP/Request.pm lib/Net/SIP/Simple/RTP.pm
gregoa-guest at users.alioth.debian.org
gregoa-guest at users.alioth.debian.org
Sat Nov 17 21:26:52 UTC 2007
Author: gregoa-guest
Date: Sat Nov 17 21:26:52 2007
New Revision: 9543
URL: http://svn.debian.org/wsvn/?sc=1&rev=9543
Log:
New upstream release.
Modified:
trunk/libnet-sip-perl/Changes
trunk/libnet-sip-perl/META.yml
trunk/libnet-sip-perl/debian/changelog
trunk/libnet-sip-perl/lib/Net/SIP.pm
trunk/libnet-sip-perl/lib/Net/SIP/Request.pm
trunk/libnet-sip-perl/lib/Net/SIP/Simple/RTP.pm
Modified: trunk/libnet-sip-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libnet-sip-perl/Changes?rev=9543&op=diff
==============================================================================
--- trunk/libnet-sip-perl/Changes (original)
+++ trunk/libnet-sip-perl/Changes Sat Nov 17 21:26:52 2007
@@ -1,4 +1,10 @@
Revision history for Net::SIP
+
+0.39
+ - work around missing support for non-blocking sockets in IO::Socket
+ on MSWin32 platform
+ - fix http://rt.cpan.org/Ticket/Display.html?id=30691 where the same realm
+ was authorized again and again if the given user/pass where wrong
0.38
- fix dns lookup problem for SRV records. Instead of using the
Modified: trunk/libnet-sip-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libnet-sip-perl/META.yml?rev=9543&op=diff
==============================================================================
--- trunk/libnet-sip-perl/META.yml (original)
+++ trunk/libnet-sip-perl/META.yml Sat Nov 17 21:26:52 2007
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Net-SIP
-version: 0.38
+version: 0.39
version_from: lib/Net/SIP.pm
installdirs: site
requires:
Modified: trunk/libnet-sip-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libnet-sip-perl/debian/changelog?rev=9543&op=diff
==============================================================================
--- trunk/libnet-sip-perl/debian/changelog (original)
+++ trunk/libnet-sip-perl/debian/changelog Sat Nov 17 21:26:52 2007
@@ -1,3 +1,9 @@
+libnet-sip-perl (0.39-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- gregor herrmann <gregor+debian at comodo.priv.at> Sat, 17 Nov 2007 22:25:48 +0100
+
libnet-sip-perl (0.38-1) unstable; urgency=low
[ Gregor Herrmann ]
Modified: trunk/libnet-sip-perl/lib/Net/SIP.pm
URL: http://svn.debian.org/wsvn/trunk/libnet-sip-perl/lib/Net/SIP.pm?rev=9543&op=diff
==============================================================================
--- trunk/libnet-sip-perl/lib/Net/SIP.pm (original)
+++ trunk/libnet-sip-perl/lib/Net/SIP.pm Sat Nov 17 21:26:52 2007
@@ -4,7 +4,7 @@
require 5.008;
package Net::SIP;
-our $VERSION = '0.38';
+our $VERSION = '0.39';
# this includes nearly everything else
use Net::SIP::Simple ();
Modified: trunk/libnet-sip-perl/lib/Net/SIP/Request.pm
URL: http://svn.debian.org/wsvn/trunk/libnet-sip-perl/lib/Net/SIP/Request.pm?rev=9543&op=diff
==============================================================================
--- trunk/libnet-sip-perl/lib/Net/SIP/Request.pm (original)
+++ trunk/libnet-sip-perl/lib/Net/SIP/Request.pm Sat Nov 17 21:26:52 2007
@@ -156,10 +156,27 @@
'proxy-authenticate' => 'proxy-authorization',
'www-authenticate' => 'authorization',
);
+
while ( my ($req,$resp) = each %auth_map ) {
+ my $existing_auth;
if ( my @auth = $response->get_header_hashval( $req ) ) {
foreach my $a (@auth) {
my $h = $a->{parameter};
+
+ # check if we already have an authorize header for this realm/opaque
+ if ( ! $existing_auth ) {
+ $existing_auth = {};
+ foreach my $hdr ( $self->get_header_hashval( $resp )) {
+ my @auth = grep { defined } map { $hdr->{parameter}{$_} }qw( realm opaque );
+ $existing_auth->{ join( "\0", at auth ) } = 1;
+ }
+ }
+
+ my @auth = grep { defined } map { $h->{$_} }qw( realm opaque );
+ if ( $existing_auth->{ join( "\0", at auth ) } ) {
+ # we have this auth header already, don't repeat
+ next;
+ }
# RFC2617
# we support only md5 (not md5-sess or other)
@@ -190,7 +207,7 @@
uri => $self->uri,
);
$digest{opaque} = $h->{opaque} if defined $h->{opaque};
-
+
# 3.2.2.1
if ( $h->{qop} ) {
my $nc = $digest{nc} = '00000001';
Modified: trunk/libnet-sip-perl/lib/Net/SIP/Simple/RTP.pm
URL: http://svn.debian.org/wsvn/trunk/libnet-sip-perl/lib/Net/SIP/Simple/RTP.pm?rev=9543&op=diff
==============================================================================
--- trunk/libnet-sip-perl/lib/Net/SIP/Simple/RTP.pm (original)
+++ trunk/libnet-sip-perl/lib/Net/SIP/Simple/RTP.pm Sat Nov 17 21:26:52 2007
@@ -16,6 +16,10 @@
use Net::SIP::Util qw(invoke_callback);
use Socket;
use Net::SIP::Debug;
+
+
+# on MSWin32 non-blocking sockets are not supported from IO::Socket
+use constant CAN_NONBLOCKING => $^O ne 'MSWin32';
###########################################################################
# creates function which will initialize Media for echo back
@@ -47,7 +51,7 @@
my @delay_buffer;
my $echo_back = sub {
my ($s_sock,$remote,$delay_buffer,$delay,$writeto,$targs,$didit,$sock) = @_;
- while (1) {
+ for my $dummy (1) {
my $buf = _receive_rtp( $sock,$writeto,$targs,$didit );
defined($buf) or last;
#DEBUG( "$didit=$$didit" );
@@ -58,18 +62,19 @@
while ( @$delay_buffer > $delay ) {
send( $s_sock,shift(@$delay_buffer),0,$remote );
}
+ CAN_NONBLOCKING && redo; # try recv again
}
};
$call->{loop}->addFD( $sock,
[ $echo_back,$s_sock,$addr,\@delay_buffer,$delay || 0,$writeto,{},\$didit ] );
- my $was_blocking = $s_sock->blocking(0);
+ my $reset_to_blocking = CAN_NONBLOCKING && $s_sock->blocking(0);
push @{ $call->{ rtp_cleanup }}, [ sub {
- my ($call,$sock,$blocking) = @_;
+ my ($call,$sock,$rb) = @_;
DEBUG( 100,"rtp_cleanup: remove socket %d",fileno($sock));
$call->{loop}->delFD( $sock );
- $sock->blocking(1) if $blocking;
- }, $call,$sock,$was_blocking ];
+ $sock->blocking(1) if $rb;
+ }, $call,$sock,$reset_to_blocking ];
}
# on RTP inactivity for at least 10 seconds close connection
@@ -136,10 +141,11 @@
while (1) {
my $buf = _receive_rtp( $sock,$writeto,$targs,$didit );
defined($buf) or return;
+ CAN_NONBLOCKING or return;
}
};
$call->{loop}->addFD( $sock, [ $receive,$writeto,{},\$didit ] );
- my $was_blocking = $sock->blocking(0);
+ my $reset_to_blocking = CAN_NONBLOCKING && $sock->blocking(0);
# sending need to be done with a timer
# ! $addr == call on hold
@@ -156,11 +162,11 @@
);
push @{ $call->{ rtp_cleanup }}, [ sub {
- my ($call,$sock,$timer,$wb) = @_;
+ my ($call,$sock,$timer,$rb) = @_;
$call->{loop}->delFD( $sock );
- $sock->blocking(1) if $wb;
+ $sock->blocking(1) if $rb;
$timer->cancel();
- }, $call,$sock,$timer,$was_blocking ];
+ }, $call,$sock,$timer,$reset_to_blocking ];
}
}
@@ -332,6 +338,7 @@
$timestamp,
0x1234, # source ID
);
+ DEBUG( 100,"send %d bytes to RTP", length($buf));
send( $sock,$header.$buf,0,$addr ) || die $!;
}
More information about the Pkg-perl-cvs-commits
mailing list