aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc/census.h
diff options
context:
space:
mode:
authorGravatar Alistair Veitch <aveitch@google.com>2016-01-22 13:01:49 -0800
committerGravatar Alistair Veitch <aveitch@google.com>2016-01-22 13:01:49 -0800
commitff14b44154b4667e666531763898e503f9f00bfd (patch)
tree641fb73ddc3f42348825d01fa5cf4117e157f2b5 /include/grpc/census.h
parentc45d088ae7d8f67f9422abc19562a81307bf78a2 (diff)
Don't use buf_size as input and output in encode
Diffstat (limited to 'include/grpc/census.h')
-rw-r--r--include/grpc/census.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/grpc/census.h b/include/grpc/census.h
index 6e4fa5a825..ab0e0e4802 100644
--- a/include/grpc/census.h
+++ b/include/grpc/census.h
@@ -438,19 +438,20 @@ int census_tag_set_get_tag_by_key(const census_tag_set *tags, const char *key,
@param tags tag set to be encoded
@param buffer pointer to buffer. This address will be used to encode the
printable tags.
- @param buf_size On input, will be a pointer to total buffer size. On output,
- will be set to total number of bytes consumed by printable
- tags.
- @param bin_buf_size on output, will be set to the number of bytes used to
- encode the binary tags.
+ @param buf_size number of available bytes in buffer.
+ @param print_buf_size Will be set to the number of bytes consumed by
+ printable tags.
+ @param bin_buf_size Will be set to the number of bytes used to encode the
+ binary tags.
@return A pointer to the binary tag's encoded, or NULL if the buffer was
insufficiently large to hold the encoded tags. Thus, if successful,
printable tags are encoded into
- [buffer, buffer + *buf_size) and binary tags into
+ [buffer, buffer + *print_buf_size) and binary tags into
[returned-ptr, returned-ptr + *bin_buf_size) (and the return value
- should be buffer + *buf_size) */
+ should be buffer + *print_buf_size) */
char *census_tag_set_encode(const census_tag_set *tags, char *buffer,
- size_t *buf_size, size_t *bin_buf_size);
+ size_t buf_size, size_t *print_buf_size,
+ size_t *bin_buf_size);
/* Decode tag set buffers encoded with census_tag_set_encode_*(). Returns NULL
if there is an error in parsing either buffer. */