[Freeswitch-svn] [commit] r5761 - freeswitch/trunk/scripts/socket/FreeSWITCH

Freeswitch SVN anthm at freeswitch.org
Wed Sep 26 11:25:26 EDT 2007


Author: anthm
Date: Wed Sep 26 11:25:26 2007
New Revision: 5761

Modified:
   freeswitch/trunk/scripts/socket/FreeSWITCH/Client.pm

Log:
init to a blank string not to 0 cos that 0 is cast to a string in this case and causes an off by 1

Modified: freeswitch/trunk/scripts/socket/FreeSWITCH/Client.pm
==============================================================================
--- freeswitch/trunk/scripts/socket/FreeSWITCH/Client.pm	(original)
+++ freeswitch/trunk/scripts/socket/FreeSWITCH/Client.pm	Wed Sep 26 11:25:26 2007
@@ -67,7 +67,7 @@
     }
     
     if ($h->{'content-length'}) {
-      if(! defined $h->{body}) { $h->{body}=0; }
+      if(! defined $h->{body}) { $h->{body} = ""; }
       while(length($h->{body}) < $h->{'content-length'}) {
 	my $buf;
 	recv $s, $buf, $h->{'content-length'} - length($h->{body}), 0;



More information about the Freeswitch-svn mailing list