That worked. Thank you.
*Andrew Eggenberger* On Mon, Apr 19, 2021 at 6:18 PM Samuel Thibault <samuel.thiba...@gnu.org> wrote: > 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 >