From c61f6826c80bc95977b9be49dfbdcc23562e4d8d Mon Sep 17 00:00:00 2001 From: grindhold Date: Wed, 16 Dec 2015 04:48:11 +0100 Subject: [PATCH] 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. --- scripts/perl/FreeSWITCH/Client.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }