summaryrefslogtreecommitdiff
path: root/funcs
diff options
context:
space:
mode:
authorMatt Jordan <mjordan@digium.com>2017-03-14 09:59:48 -0500
committerMatt Jordan <mjordan@digium.com>2017-03-14 09:59:48 -0500
commitf9b791debec911a0d0847f72952e782450002077 (patch)
tree67e5a0dd64ab711cd6d6e3c2e1b1a383a4c7ef8e /funcs
parent523de8eb8e0f7283b6c9210d5da0df541684e784 (diff)
funcs/func_devstate: Remove new line in Device field of during module load
During module loading of func_devstate, Asterisk emits the current device state of all Custom device states currently stored in the AstDB. This was erroneously including a new line character ('\n') to the end of the device state, causing two new lines to be emitted in DeviceStateChange AMI events. Note that this only happened for those device state changes that occurred during startup. Regular device state changes for Custom device states are handled elsewhere, and did not have the newline. ASTERISK-26643 #close Reported by: Roman Bedros Tested by: Matt Jordan patches: ami_devstate.diff uploaded by Roman Bedros (License 6842) Change-Id: I1f4c02fc79c448d43bf725f5039c83d9611d7d93
Diffstat (limited to 'funcs')
-rw-r--r--funcs/func_devstate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/funcs/func_devstate.c b/funcs/func_devstate.c
index 88a5c5c71..21759bc33 100644
--- a/funcs/func_devstate.c
+++ b/funcs/func_devstate.c
@@ -341,7 +341,7 @@ static int load_module(void)
if (dev_name <= (const char *) 1)
continue;
ast_devstate_changed(ast_devstate_val(db_entry->data),
- AST_DEVSTATE_CACHABLE, "Custom:%s\n", dev_name);
+ AST_DEVSTATE_CACHABLE, "Custom:%s", dev_name);
}
ast_db_freetree(db_tree);
db_tree = NULL;