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
This commit is contained in:
Luigi Rizzo
2006-10-19 17:26:20 +00:00
parent 5e8e7e0d48
commit e7c2295b81

View File

@@ -126,7 +126,7 @@ struct mansession {
char inbuf[AST_MAX_MANHEADER_LEN]; /*! Buffer */ char inbuf[AST_MAX_MANHEADER_LEN]; /*! Buffer */
int inlen; /*! number of buffered bytes */ int inlen; /*! number of buffered bytes */
int send_events; /* XXX what ? */ 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() */ int writetimeout; /* Timeout for ast_carefulwrite() */
AST_LIST_ENTRY(mansession) list; 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)) { ((s->send_events & eqe->category) == eqe->category)) {
astman_append(s, "%s", eqe->eventdata); astman_append(s, "%s", eqe->eventdata);
} }
unref_event(s->eventq); /* XXX why not eqe ? */ unref_event(s->eventq);
s->eventq = eqe; s->eventq = eqe;
} }
astman_append(s, astman_append(s,
@@ -2020,12 +2020,13 @@ static void *accept_thread(void *ignore)
*/ */
static int append_event(const char *str, int category) static int append_event(const char *str, int category)
{ {
struct eventqent *tmp, *prev = NULL; struct eventqent *prev = NULL;
tmp = ast_malloc(sizeof(*tmp) + strlen(str)); struct eventqent *tmp = ast_malloc(sizeof(*tmp) + strlen(str));
if (!tmp) if (!tmp)
return -1; return -1;
/* need to init all fields, because ast_malloc() does not */
tmp->next = NULL; tmp->next = NULL;
tmp->category = category; tmp->category = category;
strcpy(tmp->eventdata, str); strcpy(tmp->eventdata, str);