Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release-src > by-pkgid > 39d2b8be2642f76f387893d7a18f0e8a > files > 9

freeswitch-1.6.17-7.mga6.src.rpm

--- src/mod/languages/mod_python/freeswitch_python.cpp	2013-09-18 13:39:20.000000000 -0400
+++ src/mod/languages/mod_python/freeswitch_python.cpp.write-string	2013-10-06 11:38:46.766352313 -0400
@@ -284,7 +284,8 @@ switch_status_t Session::run_dtmf_callba
 
 	PyObject *pyresult, *arglist, *io = NULL;
 	int ts = 0;
-	char *str = NULL, *what = "";
+	char *str = NULL, *what = new char[10];
+	strcpy( what, "" );
 
 	if (TS) {
 		ts++;
@@ -299,9 +300,9 @@ switch_status_t Session::run_dtmf_callba
 	if (itype == SWITCH_INPUT_TYPE_DTMF) {
 		switch_dtmf_t *dtmf = (switch_dtmf_t *) input;
 		io = mod_python_conjure_DTMF(dtmf->digit, dtmf->duration);
-		what = "dtmf";
+		strcpy( what, "dtmf" );
 	} else if (itype == SWITCH_INPUT_TYPE_EVENT){
-		what = "event";
+		strcpy( what, "event" );
 		io = mod_python_conjure_event((switch_event_t *) input);
 	} else {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "unsupported type!\n");