avoid operations on closed file handles in embedded languages

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12255 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-02-23 19:52:29 +00:00
parent 1daa0746e3
commit ea88aed04b
3 changed files with 20 additions and 0 deletions
@@ -1190,6 +1190,10 @@ static switch_status_t js_stream_input_callback(switch_core_session_t *session,
switch_file_handle_t *fh = cb_state->extra;
struct js_session *jss = cb_state->session_state;
if (!switch_test_flag(fh, SWITCH_FILE_OPEN)) {
return SWITCH_STATUS_FALSE;
}
if ((status = js_common_callback(session, input, itype, buf, buflen)) != SWITCH_STATUS_SUCCESS) {
return status;
}