RPC服务器过程不调用Printf

时间:2016-09-23 14:39:50

标签: c rpc

我有一个超级简单的RPC程序,我试图实施,而且我一开始就陷入困境。这是.x:

struct intpair{
     int a;
     int b;
     string word<>;
};

program ADD_PROG{
      version ADD_VERS{
              int ADD(intpair)=1;
         } = 1;
} = 0x20000005; 

以下是add_server.c中的服务器例程:

/** This is sample code generated by rpcgen
 *  These are only templates and you can use them 
 *  as a guideline for developing your own functions.
 */

#include "add.h"
 int * add_1_svc(intpair *argp, struct svc_req *rqstp)
    {
     static int  result;
/*
* insert server code here
*/
     printf("add function called here we are\n");
     printf("parameters");

     return &result;

}

由于某种原因,我无法让服务器实际打印&#34;参数&#34;。有人知道这里出了什么问题吗?谢谢!

0 个答案:

没有答案
相关问题