X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=example%2Fserver.c;h=9a9c2644d820e075ebd8dbff32e3379cc5dd1465;hb=ef741ea530e4086344ed0ad0fc90f21c224b9503;hp=9f27906d17faf5e6d7238e7bb94a6fd1e19d925a;hpb=9fbe9a5de30c3326bd7015e91c5ba634df49ee25;p=apps%2Fagl-service-can-low-level.git diff --git a/example/server.c b/example/server.c index 9f27906d..9a9c2644 100644 --- a/example/server.c +++ b/example/server.c @@ -23,9 +23,9 @@ #include "fileproto.pb.h" #include "common.h" -bool listdir_callback(pb_ostream_t *stream, const pb_field_t *field, const void *arg) +bool listdir_callback(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) { - DIR *dir = (DIR*) arg; + DIR *dir = (DIR*) *arg; struct dirent *file; FileInfo fileinfo; @@ -55,7 +55,7 @@ void handle_connection(int connfd) if (!pb_decode(&input, ListFilesRequest_fields, &request)) { - printf("Decoding failed.\n"); + printf("Decode failed: %s\n", PB_GET_ERROR(&input)); return; }