[commit] r10884 - freeswitch/trunk/scripts/socket/FreeSWITCH
Author: anthm Date: Fri Dec 19 12:25:52 2008 New Revision: 10884 Log: fix bug in FS Client.pm Modified: freeswitch/trunk/scripts/socket/FreeSWITCH/Client.pm Modified: freeswitch/trunk/scripts/socket/FreeSWITCH/Client.pm ============================================================================== --- freeswitch/trunk/scripts/socket/FreeSWITCH/Client.pm (original) +++ freeswitch/trunk/scripts/socket/FreeSWITCH/Client.pm Fri Dec 19 12:25:52 2008 @@ -73,7 +73,7 @@ while(length($h->{body}) < $h->{'content-length'}) { my $buf; recv $s, $buf, $h->{'content-length'} - length($h->{body}), 0; - if (!$buf) { + if ($buf eq '') { $h->{socketerror} = "yes"; return $h; } @@ -152,9 +152,9 @@ my $r = $self->sendmsg({ 'command' => "api " . shift }); - if ($r->{body}) { + if ($r->{body} ne '') { $reply = $r->{body}; - } elsif ($r->{'reply-text'}) { + } elsif ($r->{'reply-text'} ne '') { $reply = $r->{'reply-text'}; } else { $reply = "socketerror";
participants (1)
-
FreeSWITCH SVN