02-18-04 12:33 AM
Hi!
I'm working on a RPC application, but since I tried to make my code
work with MT-safe code from rpcgen I have a few problems passing
strings.
If I have a .x file like this one:
program RCPROG {
version REMOTECOMPILEVERS {
int CREATEFILE(string) = 1;
string TEST(int) = 2;
} = 1;
} = 0x20000001;
and TEST is defined in the server program like this:
bool_t test_1_svc(int*somearg, char **result, struct svc_req *rgstp)
I should be able to pass a string to result_2 in the function above
(from the invocation of
test_1 in the client program:
CLIENT *clnt;
char *result_2;
int xx;
[...]
result_2 = malloc(256);
retval_2 = test_1(&xx,&result_2, clnt);
)like this:
strcpy(*result, "bla");
Right?
Either I'm just too blind to see an obvious mistake I made or I should
go back to basics..
All I want is that the client receives a string as result from
invoking test_1.
(Google didn't help much on this issue because nothing I found dealt
with returning strings using MT-safe code from rpcgen.
I've already posted this on comp.lang.c but I was told that this
question belongs here.)
[ Post a follow-up to this message ]
|