returning NULL pointer values via rpc/xdr
Jeffery Bacon
BACON at MTUS5.BITNET
Sat Jul 21 15:33:24 AEST 1990
(Maybe this isn't the place, but I imagine that there are people here who
know the answer too, and comp.protocols.nfs didn't seem right either.)
Let's suppose I have this function, char *blaoog(), that does whatever.
Now I want to put this into an rpc enviroment. So I rpcgen some code, and
write a little wrapper for the rpcgen'ned client code such that I can link
the appropriate object file and just call blaoog() as if it were local.
No problem. (Well, I didn't exactly rpcgen the code, but you get the idea.)
Now let's suppose that I wanted blaoog() to return a NULL pointer. Not too
uncommon, I wouldn't think. But how would you do it? The way I RTFM, it looks
like blaoog() HAS to return SOMETHING on the server side, otherwise boom. (I
also observe this in practice.) Right now, I have blaoog() on the server side
return a dummy value that blaoog() on the client side looks for as a signal
to return the appropriate NULL poiner. But this seems awfully kludgy if
you ask me. Is this the only way to do it? Or am I missing something? Or are
all of you horribly confused because I'm a rotten explainer?
Thanks.
Jeffery Bacon -- Computing Technology Svcs., Michigan Technological University
email- bacon at mtus5.bitnet voice: (906)487-2110 fax: (906)487-2787
alternate- uucp: <world>!itivax!anet!bacos domain: bacos%anet at itivax.iti.org
More information about the Comp.unix.questions
mailing list