msgbuf: msgbuf_append_tag(): add support for attaching a specific capability bit
This commit is contained in:
parent
b4993fe8c3
commit
d670fe5271
2 changed files with 3 additions and 2 deletions
|
@ -75,12 +75,13 @@ msgbuf_init(struct MsgBuf *msgbuf)
|
|||
}
|
||||
|
||||
static inline void
|
||||
msgbuf_append_tag(struct MsgBuf *msgbuf, const char *key, const char *value)
|
||||
msgbuf_append_tag(struct MsgBuf *msgbuf, const char *key, const char *value, unsigned int capmask)
|
||||
{
|
||||
s_assert(msgbuf->n_tags < MAXPARA);
|
||||
|
||||
msgbuf->tags[msgbuf->n_tags].key = key;
|
||||
msgbuf->tags[msgbuf->n_tags].value = value;
|
||||
msgbuf->tags[msgbuf->n_tags].capmask = capmask;
|
||||
msgbuf->n_tags++;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ msgbuf_parse(struct MsgBuf *msgbuf, char *line)
|
|||
*eq++ = '\0';
|
||||
|
||||
if (*t && *t != ' ')
|
||||
msgbuf_append_tag(msgbuf, t, eq);
|
||||
msgbuf_append_tag(msgbuf, t, eq, 0);
|
||||
else
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue