Skip to content
Snippets Groups Projects
Commit bebb9192 authored by Dmitry Simonenko's avatar Dmitry Simonenko
Browse files

connector-c-lite: tp_getreqid added, fixed tp_req.

parent ce7fb51f
No related branches found
No related tags found
No related merge requests found
......@@ -205,6 +205,12 @@ tp_reqid(struct tp *p, uint32_t reqid) {
p->h->reqid = reqid;
}
static inline uint32_t
tp_getreqid(struct tp *p) {
assert(p->h != NULL);
return p->h->reqid;
}
static inline uint32_t
tp_tuplecount(struct tp *p) {
assert(p->t != NULL);
......@@ -493,7 +499,7 @@ tp_reqbuf(char *buf, size_t size) {
static inline ssize_t
tp_req(struct tp *p) {
return tp_reqbuf(p->s, tp_used(p));
return tp_reqbuf(p->s, tp_size(p));
}
static inline size_t
......@@ -649,7 +655,7 @@ tp_nextfield(struct tp *p) {
fetch:;
register int rc = tp_leb128load(p, &p->fsz);
if (tp_unlikely(rc == -1))
return 0;
return -1;
return 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment