#include <pb_encode.h>
#include <pb_decode.h>
-#include "fileproto.h"
+#include "fileproto.pb.h"
#include "common.h"
bool listdir_callback(pb_ostream_t *stream, const pb_field_t *field, const void *arg)
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;
}
if (!pb_decode(&input, ListFilesRequest_fields, &request))
{
- printf("Decoding failed.\n");
+ printf("Decode failed: %s\n", PB_GET_ERROR(&input));
return;
}