R
Razzle
Hi!
I'm working on a RPC application, but since I tried to make my code
multithreaded 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 (from the invocation of
test_1 in the client program:
char *result_2;
result_2 = (char *)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 in multithreaded mode)
I'm working on a RPC application, but since I tried to make my code
multithreaded 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 (from the invocation of
test_1 in the client program:
char *result_2;
result_2 = (char *)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 in multithreaded mode)