Any C devs catch a silly mistake here? Seems like it should work? https://stackoverflow.com/questions/45268988/return-a-struct-with-string-from-a-multi-threaded-rpc-server …
What's up with the `.x` file? What's the C equivalent code? Are you sure you can use `strcopy` on to a `string` field like that?
-
-
the `.x` is an XDR file. It's used to generate RPC code via `rpcgen -MN foo.x`. It will make foo_xdr.c, foo.h, foo_clnt.c, & foo_svc.c
-
Do you have the equivalent C code for the struct definition of `foo`? That malloc almost certainly is the segfault cause
End of conversation
New conversation -
-
-
the "string" turns into a char * struct foo_out { char *name; }; typedef struct foo_out foo_out;
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.