mirror of
https://github.com/jambonz/freeswitch-modules.git
synced 2025-12-19 06:57:44 +00:00
append null to ostringstream will make c_str return part of a string. (#83)
* append null to ostringstream will make c_str return part of a string. * fixed review comment Signed-off-by: Quan HL <quan.luuhoang8@gmail.com> * fixed review comment Signed-off-by: Quan HL <quan.luuhoang8@gmail.com> * fixed review comment Signed-off-by: Quan HL <quan.luuhoang8@gmail.com> --------- Signed-off-by: Quan HL <quan.luuhoang8@gmail.com>
This commit is contained in:
@@ -382,22 +382,18 @@ private:
|
||||
|
||||
const char* endpoint = switch_channel_get_variable(channel, "AZURE_SERVICE_ENDPOINT");
|
||||
const char* endpointId = switch_channel_get_variable(channel, "AZURE_SERVICE_ENDPOINT_ID");
|
||||
configuration_stream <<
|
||||
endpoint << ";" <<
|
||||
endpointId << ";";
|
||||
configuration_stream << (endpoint ? endpoint : "") << ";"
|
||||
<< (endpointId ? endpointId : "") << ";";
|
||||
if (switch_true(switch_channel_get_variable(channel, "AZURE_USE_OUTPUT_FORMAT_DETAILED"))) {
|
||||
configuration_stream << "output_format_detailed;";
|
||||
}
|
||||
if (switch_true(switch_channel_get_variable(channel, "AZURE_AUDIO_LOGGING"))) {
|
||||
configuration_stream << "audio_logging;";
|
||||
}
|
||||
if (nullptr != proxyIP && nullptr != proxyPort) {
|
||||
configuration_stream <<
|
||||
proxyIP << ";" <<
|
||||
proxyPort << ";" <<
|
||||
proxyUsername << ";" <<
|
||||
proxyPassword << ";";
|
||||
}
|
||||
configuration_stream << (proxyIP ? proxyIP : "") << ";"
|
||||
<< (proxyPort ? proxyPort : "") << ";"
|
||||
<< (proxyUsername ? proxyUsername : "") << ";"
|
||||
<< (proxyPassword ? proxyPassword : "") << ";";
|
||||
const char* var;
|
||||
if (var = switch_channel_get_variable(channel, "AZURE_SPEECH_ALTERNATIVE_LANGUAGE_CODES")) {
|
||||
configuration_stream << var << ";";
|
||||
|
||||
Reference in New Issue
Block a user