void tag_marshal_record(struct evbuffer *evbuf, uint8_t tag, struct record *record) { struct evbuffer *tmp = evbuffer_new(); record_marshal(tmp, record); tag_marshal(evbuf, tag, EVBUFFER_DATA(tmp), EVBUFFER_LENGTH(tmp)); evbuffer_free(tmp); }
void tag_marshal_record(struct evbuffer *evbuf, uint8_t tag, struct record *record) { struct evbuffer *tmp = evbuffer_new(); if (tmp != NULL) { record_marshal(tmp, record); evtag_marshal_buffer(evbuf, tag, tmp); evbuffer_free(tmp); } }