Subject: | [patch] set_uri in SIP_REQUEST doesn't update as_string |
Net-SIP 0.40, Ubuntu 7.10
#!/usr/bin/perl -w
$sip = Net::SIP::Request::new($sip_string);
$sip->set_uri($some_new_string)
print $sip->as_string
You will notice that the the printed packet contains the old string. Patch attached fixes for me.
Subject: | update_string_on_set_uri.patch.txt |
--- Request.pm.orig 2007-12-07 00:25:44.000000000 -0600
+++ Request.pm 2007-12-07 00:24:34.000000000 -0600
@@ -31,6 +31,7 @@
sub set_uri {
my Net::SIP::Request $self = shift;
$self->{text} = shift;
+ $self->_update_string;
}
###########################################################################