From: João Mesquita Date: Tue, 5 Jan 2010 07:01:37 +0000 (+0000) Subject: Fix a bug with QString and switch_event_expand_headers(). Thanks MikeJ. X-Git-Tag: v1.0.6~863 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1dc7a3b4c4dc742a1556fde662a6a9f476c68d52;p=thirdparty%2Ffreeswitch.git Fix a bug with QString and switch_event_expand_headers(). Thanks MikeJ. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16147 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/fscomm/mod_qsettings/mod_qsettings.cpp b/fscomm/mod_qsettings/mod_qsettings.cpp index 38fbd9733e..b2cf8ee843 100644 --- a/fscomm/mod_qsettings/mod_qsettings.cpp +++ b/fscomm/mod_qsettings/mod_qsettings.cpp @@ -68,7 +68,7 @@ switch_xml_t XMLBinding::getConfigXML(QString tmpl) } /* Open template file and expand all strings based on QSettings */ - QString tmplContents(tmplFile.readAll()); + QByteArray tmplContents(tmplFile.readAll()); tmplFile.close(); _settings->beginGroup("FreeSIWTCH/conf"); _settings->beginGroup(tmpl); @@ -77,7 +77,7 @@ switch_xml_t XMLBinding::getConfigXML(QString tmpl) switch_event_add_header_string(e, SWITCH_STACK_BOTTOM, k.toAscii().constData(), _settings->value(k).toByteArray().constData()); } - char *res = switch_event_expand_headers(e, tmplContents.toAscii().constData()); + char *res = switch_event_expand_headers(e, tmplContents.data()); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Template %s as follows:\n%s", tmpl.toAscii().constData(), res); switch_safe_free(e); return switch_xml_parse_str(res, strlen(res));