Reset the thread local string buffer when handling the UserEvent action.
authorJoshua Colp <jcolp@digium.com>
Tue, 10 Mar 2009 14:40:38 +0000 (14:40 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 10 Mar 2009 14:40:38 +0000 (14:40 +0000)
(closes issue #14593)
Reported by: JimDickenson

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@180800 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index e3c2c03..77362cb 100644 (file)
@@ -2662,6 +2662,9 @@ static int action_userevent(struct mansession *s, const struct message *m)
        const char *event = astman_get_header(m, "UserEvent");
        struct ast_str *body = ast_str_thread_get(&userevent_buf, 16);
        int x;
+
+       ast_str_reset(body);
+
        for (x = 0; x < m->hdrcount; x++) {
                if (strncasecmp("UserEvent:", m->headers[x], strlen("UserEvent:"))) {
                        ast_str_append(&body, 0, "%s\r\n", m->headers[x]);