diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-08-18 11:07:58 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-08-18 11:07:58 +0000 |
commit | 565359c41b600e5720789573985e1ca6a3c2512e (patch) | |
tree | 9d8d8ae9eeb14cebd5d9daa3945d71cba5606bcd | |
parent | a07418c0f3f4a335147fb5af3e13b5e8bd304344 (diff) |
Fixed crash in Python when receiving incoming DTMF digits
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2220 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip-apps/src/python/_pjsua.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pjsip-apps/src/python/_pjsua.c b/pjsip-apps/src/python/_pjsua.c index 0966d90e..502905a4 100644 --- a/pjsip-apps/src/python/_pjsua.c +++ b/pjsip-apps/src/python/_pjsua.c @@ -188,7 +188,7 @@ static void cb_on_dtmf_digit(pjsua_call_id call_id, int digit) if (PyCallable_Check(g_obj_callback->on_dtmf_digit)) { char digit_str[10]; - ENTER_PYTHON(); + PyGILState_STATE state = PyGILState_Ensure(); pj_ansi_snprintf(digit_str, sizeof(digit_str), "%c", digit); @@ -200,7 +200,7 @@ static void cb_on_dtmf_digit(pjsua_call_id call_id, int digit) NULL ); - LEAVE_PYTHON(); + PyGILState_Release(state); } } |