Diff for /libaitrpc/src/builtin.c between versions 1.7.2.6 and 1.7.2.7

version 1.7.2.6, 2012/05/17 07:53:03 version 1.7.2.7, 2012/05/17 08:42:32
Line 49  SUCH DAMAGE. Line 49  SUCH DAMAGE.
 /* builtin RPC server functions */  /* builtin RPC server functions */
   
 static int  static int
rpcServerClients(rpc_func_t *call, int ic, array_t *iv)rpcServerClients(rpc_func_t *call, struct tagRPCCall *rpc, array_t *iv)
 {  {
         rpc_srv_t *srv;          rpc_srv_t *srv;
         rpc_cli_t *cli;          rpc_cli_t *cli;
Line 89  rpcServerClients(rpc_func_t *call, int ic, array_t *iv Line 89  rpcServerClients(rpc_func_t *call, int ic, array_t *iv
 }  }
   
 static int  static int
rpcServerCalls(rpc_func_t *call, int ic, array_t *iv)rpcServerCalls(rpc_func_t *call, struct tagRPCCall *rpc, array_t *iv)
 {  {
         rpc_srv_t *srv;          rpc_srv_t *srv;
         rpc_func_t *f;          rpc_func_t *f;
Line 118  rpcServerCalls(rpc_func_t *call, int ic, array_t *iv) Line 118  rpcServerCalls(rpc_func_t *call, int ic, array_t *iv)
                         strlcat(val, str, len);                          strlcat(val, str, len);
                 }                  }
   
        AIT_SET_STR(io_array(RPC_FUNC_RETVARS(call), 0, ait_val_t*), val);        AIT_SET_STR(io_getVars(RPC_FUNC_RETVARS(call), 0), val);
         free(val);          free(val);
         return 0;          return 0;
 }  }
   
 static int  static int
rpcServerSessions(rpc_func_t *call, int ic, array_t *iv)rpcServerSessions(rpc_func_t *call, struct tagRPCCall *rpc, array_t *iv)
 {  {
         rpc_srv_t *srv;          rpc_srv_t *srv;
         ait_val_t *v;          ait_val_t *v;
Line 145  rpcServerSessions(rpc_func_t *call, int ic, array_t *i Line 145  rpcServerSessions(rpc_func_t *call, int ic, array_t *i
 }  }
   
 static int  static int
rpcServerShutdown(rpc_func_t *call, int ic, array_t *iv)rpcServerShutdown(rpc_func_t *call, struct tagRPCCall *rpc, array_t *iv)
 {  {
         rpc_srv_t *srv;          rpc_srv_t *srv;
   
Line 158  rpcServerShutdown(rpc_func_t *call, int ic, array_t *i Line 158  rpcServerShutdown(rpc_func_t *call, int ic, array_t *i
 }  }
   
 static int  static int
rpcServerPing(rpc_func_t *call, int ic, array_t *iv)rpcServerPing(rpc_func_t *call, struct tagRPCCall *rpc, array_t *iv)
 {  {
        rpc_srv_t *srv;        AIT_SET_U16(io_getVars(RPC_FUNC_RETVARS(call), 0), ntohs(rpc->call_seq));
 
        srv = RPC_FUNC_SERVER(call); 
 
         return 0;          return 0;
 }  }
   
 /* ---------------------------------------------------- */  /* ---------------------------------------------------- */
   
 static int  static int
rpcBLOBServerShutdown(rpc_func_t *call, int ic, array_t *iv)rpcBLOBServerShutdown(rpc_func_t *call, struct tagRPCCall *rpc, array_t *iv)
 {  {
         rpc_srv_t *srv;          rpc_srv_t *srv;
   
Line 183  rpcBLOBServerShutdown(rpc_func_t *call, int ic, array_ Line 180  rpcBLOBServerShutdown(rpc_func_t *call, int ic, array_
 }  }
   
 static int  static int
rpcBLOBServerVars(rpc_func_t *call, int ic, array_t *iv)rpcBLOBServerVars(rpc_func_t *call, struct tagRPCCall *rpc, array_t *iv)
 {  {
         rpc_srv_t *srv;          rpc_srv_t *srv;
         rpc_blob_t *b;          rpc_blob_t *b;
Line 226  rpcBLOBServerVars(rpc_func_t *call, int ic, array_t *i Line 223  rpcBLOBServerVars(rpc_func_t *call, int ic, array_t *i
 }  }
   
 static int  static int
rpcBLOBServerClients(rpc_func_t *call, int ic, array_t *iv)rpcBLOBServerClients(rpc_func_t *call, struct tagRPCCall *rpc, array_t *iv)
 {  {
         rpc_srv_t *srv;          rpc_srv_t *srv;
         rpc_cli_t *cli;          rpc_cli_t *cli;
Line 271  rpcBLOBServerClients(rpc_func_t *call, int ic, array_t Line 268  rpcBLOBServerClients(rpc_func_t *call, int ic, array_t
 }  }
   
 /* ----------------------------------------------------------------- */  /* ----------------------------------------------------------------- */
   
   /*
    * rpc_register_srvPing() - Register ping service function
    *
    * @srv = RPC server instance
    * return: -1 error or 0 ok
    */
   inline int
   rpc_register_srvPing(rpc_srv_t * __restrict srv)
   {
           if (!srv)
                   return -1;
   
           if (rpc_srv_registerCall(srv, CALL_SRVPING, rpcServerPing, 1) < 1)
                   return -1;
   
           return 0;
   }
   
 /*  /*
  * rpc_register_srvServices() - Register internal service functions   * rpc_register_srvServices() - Register internal service functions

Removed from v.1.7.2.6  
changed lines
  Added in v.1.7.2.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>