mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 18:55:19 +00:00 
			
		
		
		
	Reset the thread local string buffer when handling the UserEvent action.
(closes issue #14593) Reported by: JimDickenson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -2662,6 +2662,9 @@ static int action_userevent(struct mansession *s, const struct message *m) | |||||||
| 	const char *event = astman_get_header(m, "UserEvent"); | 	const char *event = astman_get_header(m, "UserEvent"); | ||||||
| 	struct ast_str *body = ast_str_thread_get(&userevent_buf, 16); | 	struct ast_str *body = ast_str_thread_get(&userevent_buf, 16); | ||||||
| 	int x; | 	int x; | ||||||
|  |  | ||||||
|  | 	ast_str_reset(body); | ||||||
|  |  | ||||||
| 	for (x = 0; x < m->hdrcount; x++) { | 	for (x = 0; x < m->hdrcount; x++) { | ||||||
| 		if (strncasecmp("UserEvent:", m->headers[x], strlen("UserEvent:"))) { | 		if (strncasecmp("UserEvent:", m->headers[x], strlen("UserEvent:"))) { | ||||||
| 			ast_str_append(&body, 0, "%s\r\n", m->headers[x]); | 			ast_str_append(&body, 0, "%s\r\n", m->headers[x]); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user