aboutsummaryrefslogtreecommitdiffstats
path: root/example/server.c
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-03-01 13:46:52 +0200
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-03-01 13:46:52 +0200
commit9fbe9a5de30c3326bd7015e91c5ba634df49ee25 (patch)
tree16f0140e0ede0606e49057be64b0a8450c46b14c /example/server.c
parent0cdc623050ac8c76f3a8dbd14675a3b29f18542d (diff)
Refactoring the field encoder interface.
Replaced the confusing pb_enc_* functions with new pb_encode_* functions that have a cleaner interface. Updated documentation. Got rid of the endian_copy stuff in pb_encode.c, instead using C casts to do it automatically. This makes the code safer and also reduces binary size by about 5%. Fixes Issue 6.
Diffstat (limited to 'example/server.c')
-rw-r--r--example/server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/example/server.c b/example/server.c
index aba0667b..9f27906d 100644
--- a/example/server.c
+++ b/example/server.c
@@ -38,7 +38,7 @@ bool listdir_callback(pb_ostream_t *stream, const pb_field_t *field, const void
if (!pb_encode_tag_for_field(stream, field))
return false;
- if (!pb_enc_submessage(stream, field, &fileinfo))
+ if (!pb_encode_submessage(stream, FileInfo_fields, &fileinfo))
return false;
}