use channel flag to tell when to read from channel during some stuff

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1590 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2006-06-09 22:59:13 +00:00
1 parent 1212c95e55
commit fe32a839df
6 files changed
+29 -29

No files matched your search

@@ -559,8 +559,6 @@ static JSBool session_get_digits(JSContext *cx, JSObject *obj, uintN argc, jsval
char *buf;
int digits;
int32 timeout = 5000;
int32 poll_chan = 1;
if (argc > 0) {
char term;
@@ -571,11 +569,9 @@ static JSBool session_get_digits(JSContext *cx, JSObject *obj, uintN argc, jsval
if (argc > 2) {
JS_ValueToInt32(cx, argv[2], &timeout);
}
if (argc > 3) {
JS_ValueToInt32(cx, argv[3], &poll_chan);
}
buf = switch_core_session_alloc(jss->session, digits);
switch_ivr_collect_digits_count(jss->session, buf, digits, digits, terminators, &term, timeout, poll_chan ? SWITCH_TRUE : SWITCH_FALSE);
switch_ivr_collect_digits_count(jss->session, buf, digits, digits, terminators, &term, timeout);
*rval = STRING_TO_JSVAL ( JS_NewStringCopyZ(cx, buf) );
return JS_TRUE;
}