summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/app_minivm.c8
-rw-r--r--apps/app_queue.c4
-rw-r--r--channels/chan_pjsip.c6
-rw-r--r--res/res_smdi.c4
4 files changed, 8 insertions, 14 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index fc4f9a274..45d04d8ba 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -1838,7 +1838,8 @@ static int notify_new_message(struct ast_channel *chan, const char *templatename
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);
}
@@ -1867,9 +1868,8 @@ static int notify_new_message(struct ast_channel *chan, const char *templatename
notify_cleanup:
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;
}
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 1b84da1ea..1c42f8c61 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -6725,7 +6725,7 @@ static int try_calling(struct queue_ent *qe, struct ast_flags opts, char **opt_a
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");
@@ -9213,7 +9213,7 @@ static char *__queues_show(struct mansession *s, int fd, int argc, const char *
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, ")");
diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index 1277d559f..897aa2d49 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -1941,12 +1941,6 @@ static int sendtext(void *obj)
.body_text = data->text
};
- /* NOT ast_strlen_zero, because a zero-length message is specifically
- * allowed by RFC 3428 (See section 10, Examples) */
- if (!data->text) {
- return 0;
- }
-
ast_debug(3, "Sending in dialog SIP message\n");
ast_sip_create_request("MESSAGE", data->session->inv_session->dlg, data->session->endpoint, NULL, NULL, &tdata);
diff --git a/res/res_smdi.c b/res/res_smdi.c
index 02f2e4a79..fc89d9efe 100644
--- a/res/res_smdi.c
+++ b/res/res_smdi.c
@@ -873,10 +873,10 @@ static int smdi_md_q_cmp_fn(void *obj, void *arg, int flags)
switch (flags & OBJ_SEARCH_MASK) {
case OBJ_SEARCH_OBJECT:
- if (search_msg->mesg_desk_num) {
+ if (!ast_strlen_zero(search_msg->mesg_desk_num)) {
cmp = strcmp(msg->mesg_desk_num, search_msg->mesg_desk_num);
}
- if (search_msg->mesg_desk_term) {
+ if (!ast_strlen_zero(search_msg->mesg_desk_term)) {
cmp |= strcmp(msg->mesg_desk_term, search_msg->mesg_desk_term);
}
break;