diff options
author | Luigi Rizzo <rizzo@icir.org> | 2006-10-19 17:26:20 +0000 |
---|---|---|
committer | Luigi Rizzo <rizzo@icir.org> | 2006-10-19 17:26:20 +0000 |
commit | e7c2295b81654aa5d9adc6295d93ffc7a6215a06 (patch) | |
tree | d155d61066357206a7c1a330cbc5d2b83d13ac22 | |
parent | 5e8e7e0d482dd89ebfba779b9624f74846121e99 (diff) |
more fixes to comments and very minor code rearrangement.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | main/manager.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/main/manager.c b/main/manager.c index 3f32e73c9..5da2797cb 100644 --- a/main/manager.c +++ b/main/manager.c @@ -126,7 +126,7 @@ struct mansession { char inbuf[AST_MAX_MANHEADER_LEN]; /*! Buffer */ int inlen; /*! number of buffered bytes */ int send_events; /* XXX what ? */ - struct eventqent *eventq; /* Queued events that we've not had the ability to send yet */ + struct eventqent *eventq; /* last event processed. */ int writetimeout; /* Timeout for ast_carefulwrite() */ AST_LIST_ENTRY(mansession) list; }; @@ -1005,7 +1005,7 @@ static int action_waitevent(struct mansession *s, struct message *m) ((s->send_events & eqe->category) == eqe->category)) { astman_append(s, "%s", eqe->eventdata); } - unref_event(s->eventq); /* XXX why not eqe ? */ + unref_event(s->eventq); s->eventq = eqe; } astman_append(s, @@ -2020,12 +2020,13 @@ static void *accept_thread(void *ignore) */ static int append_event(const char *str, int category) { - struct eventqent *tmp, *prev = NULL; - tmp = ast_malloc(sizeof(*tmp) + strlen(str)); + struct eventqent *prev = NULL; + struct eventqent *tmp = ast_malloc(sizeof(*tmp) + strlen(str)); if (!tmp) return -1; + /* need to init all fields, because ast_malloc() does not */ tmp->next = NULL; tmp->category = category; strcpy(tmp->eventdata, str); |