RPC question
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > RPC question




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    RPC question  
Razzle


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:46 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register