aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_smdi.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_smdi.c')
-rw-r--r--res/res_smdi.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/res/res_smdi.c b/res/res_smdi.c
index c0c7f8927..87540e48f 100644
--- a/res/res_smdi.c
+++ b/res/res_smdi.c
@@ -112,7 +112,8 @@ int ast_smdi_mwi_set(struct ast_smdi_interface *iface, const char *mailbox)
fclose(file);
ASTOBJ_UNLOCK(iface);
- ast_log(LOG_DEBUG, "Sent MWI set message for %s on %s\n", mailbox, iface->name);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Sent MWI set message for %s on %s\n", mailbox, iface->name);
return 0;
}
@@ -143,7 +144,8 @@ int ast_smdi_mwi_unset(struct ast_smdi_interface *iface, const char *mailbox)
fclose(file);
ASTOBJ_UNLOCK(iface);
- ast_log(LOG_DEBUG, "Sent MWI unset message for %s on %s\n", mailbox, iface->name);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Sent MWI unset message for %s on %s\n", mailbox, iface->name);
return 0;
}
@@ -412,7 +414,8 @@ static void *smdi_read(void *iface_p)
/* add the message to the message queue */
md_msg->timestamp = ast_tvnow();
ast_smdi_md_message_push(iface, md_msg);
- ast_log(LOG_DEBUG, "Recieved SMDI MD message on %s\n", iface->name);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Recieved SMDI MD message on %s\n", iface->name);
ASTOBJ_UNREF(md_msg, ast_smdi_md_message_destroy);
@@ -455,7 +458,8 @@ static void *smdi_read(void *iface_p)
/* add the message to the message queue */
mwi_msg->timestamp = ast_tvnow();
ast_smdi_mwi_message_push(iface, mwi_msg);
- ast_log(LOG_DEBUG, "Recieved SMDI MWI message on %s\n", iface->name);
+ if (option_debug)
+ ast_log(LOG_DEBUG, "Recieved SMDI MWI message on %s\n", iface->name);
ASTOBJ_UNREF(mwi_msg, ast_smdi_mwi_message_destroy);
} else {