Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!pacbell.com!ames!uhccux!quonset!jwright From: jwright@cfht.hawaii.edu (Jim Wright) Newsgroups: comp.protocols.misc Subject: RPCGEN and array of strings Message-ID: Date: 18 Jul 90 20:53:43 GMT Sender: news@uhccux.uhcc.Hawaii.Edu Distribution: comp Lines: 48 In an RPC call, part of the structure I'm passing is an array of strings. All is OK on the server before returning, but the client only sees garbage. The samples below have lots removed, but I hope they get the idea across. Specifically, I don't have any lack of error checking in the real code. Are there any special tricks involved in passing an array of strings? Any help is greatly appreciated. ================= from rpcgen file: ================= const NUMERRSTR = 4; typedef string ErrorStr<>; union ErrorStrs switch (int errno) { case 0: ErrorStr str[NUMERRSTR]; default: void; }; ===================== from the server side: ===================== ErrorStrs errorstrs; ErrorStrs *logger_geterr_1(device) char **device; { for (n=0 ; nErrorStrs_u.str[n]); } -- Jim Wright jwright@quonset.cfht.hawaii.edu Canada-France-Hawaii Telescope Corp.