[asterisk-commits] funcs/func devstate: Remove new line in Device field of duri... (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 15 20:13:18 CDT 2017


Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5191 )

Change subject: funcs/func_devstate: Remove new line in Device field of during module load
......................................................................


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
---
M funcs/func_devstate.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Kevin Harwell: Looks good to me, approved
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/funcs/func_devstate.c b/funcs/func_devstate.c
index 965c7c7..5789e2b 100644
--- a/funcs/func_devstate.c
+++ b/funcs/func_devstate.c
@@ -339,7 +339,7 @@
 		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;

-- 
To view, visit https://gerrit.asterisk.org/5191
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f4c02fc79c448d43bf725f5039c83d9611d7d93
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>



More information about the asterisk-commits mailing list