git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10884
d0543943-73ff-0310-b7d9-
9358b9ac24b2
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;
}
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";