Rework of Filter's handling of the socket with freeswitch, the previous implementation was a serious cheat. We now properly handle the Content-Length tag and go out of line based mode and into length mode.

Also updated the console to show replies to commands.


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3168 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Paul Tinsley
2006-10-23 20:47:22 +00:00
parent 39df1481c2
commit 900ad177d6
4 changed files with 64 additions and 50 deletions

View File

@@ -270,12 +270,14 @@ sub handle_server_input {
if($input->{'Content-Type'} eq "auth/request") {
$heap->{'server'}->put("auth $server_secret");
} elsif ($input->{'Content-Type'} eq "api/response") {
new_message('destination_window' => 0, 'message' => 'Response: ');
new_message('destination_window' => 0, 'message' => 'API Response: ');
new_message('destination_window' => 0, 'message' => $input->{'__DATA__'});
} elsif ($input->{'Content-Type'} eq "log/data") {
new_message('destination_window' => 1, 'message' => $input->{'__DATA__'});
} elsif ($input->{'Content-Type'} eq "text/event-plain") {
new_message('destination_window' => 2, 'message' => Dumper $input);
} elsif ($input->{'Content-Type'} eq "command/reply") {
new_message('destination_window' => 0, 'message' => 'Command Response: ' . $input->{'Reply-Text'});
}
};