From: grindhold Date: Wed, 16 Dec 2015 03:48:11 +0000 (+0100) Subject: bugfix: prevented endless loop in sendmsg X-Git-Tag: v1.6.6~1^2~25^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c61f6826c80bc95977b9be49dfbdcc23562e4d8d;p=thirdparty%2Ffreeswitch.git bugfix: prevented endless loop in sendmsg FS-8667 - some commands do not send a response with the type command/reply but send api/response instead. check for this type, too in order to prevent $client->comand() from never returning to the users script. --- diff --git a/scripts/perl/FreeSWITCH/Client.pm b/scripts/perl/FreeSWITCH/Client.pm index 01748a8180..f107aa3d82 100644 --- a/scripts/perl/FreeSWITCH/Client.pm +++ b/scripts/perl/FreeSWITCH/Client.pm @@ -145,7 +145,8 @@ sub sendmsg($$$) { for(;;) { $e = $self->readhash(undef); - last if $e->{socketerror} or $e->{'content-type'} eq 'command/reply'; + last if $e->{socketerror} or $e->{'content-type'} eq 'command/reply' + or $e->{'content-type'} eq 'api/response'; push @{$self->{events}}, $e; }