]> jfr.im git - solanum.git/blobdiff - include/msgbuf.h
tests: send1: fix sendto_channel_opmod (remote) to cover all scenarios
[solanum.git] / include / msgbuf.h
index ed7a04adf30442d3626ae3d382707e4f993514e3..1bcff5edc6b1ac12cb4d2c39e55b73015f84e91d 100644 (file)
@@ -55,7 +55,7 @@ int msgbuf_parse(struct MsgBuf *msgbuf, char *line);
  * cmd may not be NULL.
  * returns 0 on success, 1 on error.
  */
-int msgbuf_unparse(char *buf, size_t buflen, struct MsgBuf *msgbuf, unsigned int capmask);
+int msgbuf_unparse(char *buf, size_t buflen, const struct MsgBuf *msgbuf, unsigned int capmask);
 
 /*
  * unparse a MsgBuf header plus payload into a buffer.
@@ -63,10 +63,10 @@ int msgbuf_unparse(char *buf, size_t buflen, struct MsgBuf *msgbuf, unsigned int
  * cmd may not be NULL.
  * returns 0 on success, 1 on error.
  */
-int msgbuf_unparse_fmt(char *buf, size_t buflen, struct MsgBuf *head, unsigned int capmask, const char *fmt, ...) AFP(5, 6);
-int msgbuf_vunparse_fmt(char *buf, size_t buflen, struct MsgBuf *head, unsigned int capmask, const char *fmt, va_list va);
+int msgbuf_unparse_fmt(char *buf, size_t buflen, const struct MsgBuf *head, unsigned int capmask, const char *fmt, ...) AFP(5, 6);
+int msgbuf_vunparse_fmt(char *buf, size_t buflen, const struct MsgBuf *head, unsigned int capmask, const char *fmt, va_list va);
 
-void msgbuf_unparse_prefix(char *buf, size_t buflen, struct MsgBuf *msgbuf, unsigned int capmask);
+void msgbuf_unparse_prefix(char *buf, size_t *buflen, const struct MsgBuf *msgbuf, unsigned int capmask);
 
 static inline void
 msgbuf_init(struct MsgBuf *msgbuf)
@@ -85,13 +85,4 @@ msgbuf_append_tag(struct MsgBuf *msgbuf, const char *key, const char *value, uns
        }
 }
 
-static inline void
-msgbuf_append_para(struct MsgBuf *msgbuf, const char *para)
-{
-       if (msgbuf->n_para < MAXPARA) {
-               msgbuf->para[msgbuf->n_para] = para;
-               msgbuf->n_para++;
-       }
-}
-
 #endif