Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix bugs in extension support when multiple extension fields are present.
[apps/agl-service-can-low-level.git]
/
example
/
common.c
diff --git
a/example/common.c
b/example/common.c
index
b27ccae
..
04a5aa8
100644
(file)
--- a/
example/common.c
+++ b/
example/common.c
@@
-19,15
+19,6
@@
static bool read_callback(pb_istream_t *stream, uint8_t *buf, size_t count)
int fd = (intptr_t)stream->state;
int result;
int fd = (intptr_t)stream->state;
int result;
- if (buf == NULL)
- {
- /* Well, this is a really inefficient way to skip input. */
- /* It is only used when there are unknown fields. */
- char dummy;
- while (count-- && recv(fd, &dummy, 1, 0) == 1);
- return count == 0;
- }
-
result = recv(fd, buf, count, MSG_WAITALL);
if (result == 0)
result = recv(fd, buf, count, MSG_WAITALL);
if (result == 0)