Andrew Eggenberger, le dim. 18 avril 2021 20:27:09 -0500, a ecrit:
>   while(i++ < amt){
>     d = *(struct direct*)dirents;

That cannot work: d_name is a flexible array member, so the struct copy
wouldn't copy everything. Make this

>   struct direct *d;
>     d = (struct direct*)dirents;

and that'll work.

Also, you need to initialize dirents to NULL and dataCnt to 0, because
RPCs try to reuse the buffers you pass them.

Samuel

Reply via email to