etemplate = message_template_find(vmu->ptemplate);
if (!etemplate)
etemplate = message_template_find("pager-default");
- if (etemplate->locale) {
+
+ if (!ast_strlen_zero(etemplate->locale)) {
ast_copy_string(oldlocale, setlocale(LC_TIME, ""), sizeof(oldlocale));
setlocale(LC_TIME, etemplate->locale);
}
ast_manager_event(chan, EVENT_FLAG_CALL, "MiniVoiceMail", "Action: SentNotification\rn\nMailbox: %s@%s\r\nCounter: %s\r\n", vmu->username, vmu->domain, counter);
run_externnotify(chan, vmu); /* Run external notification */
-
- if (etemplate->locale) {
- setlocale(LC_TIME, oldlocale); /* Rest to old locale */
+ if (!ast_strlen_zero(etemplate->locale)) {
+ setlocale(LC_TIME, oldlocale); /* Reset to old locale */
}
return res;
}
ast_channel_unlock(qe->chan);
/* Begin Monitoring */
- if (qe->parent->monfmt && *qe->parent->monfmt) {
+ if (*qe->parent->monfmt) {
if (!qe->parent->montype) {
const char *monexec;
ast_debug(1, "Starting Monitor as requested.\n");
ast_str_set(&out, 0, " %s", mem->membername);
if (strcasecmp(mem->membername, mem->interface)) {
ast_str_append(&out, 0, " (%s", mem->interface);
- if (mem->state_interface) {
+ if (!ast_strlen_zero(mem->state_interface)) {
ast_str_append(&out, 0, " from %s", mem->state_interface);
}
ast_str_append(&out, 0, ")");