From 565359c41b600e5720789573985e1ca6a3c2512e Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Mon, 18 Aug 2008 11:07:58 +0000 Subject: 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 --- pjsip-apps/src/python/_pjsua.c | 4 ++-- 1 file 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); } } -- cgit v1.2.3