Diff for /libaitrpc/src/aitrpc.c between versions 1.5 and 1.5.6.2

version 1.5, 2012/03/15 01:55:33 version 1.5.6.2, 2012/05/15 16:06:13
Line 48  SUCH DAMAGE. Line 48  SUCH DAMAGE.
   
 #pragma GCC visibility push(hidden)  #pragma GCC visibility push(hidden)
   
 // ------------------------------------------------  
   
 int rpc_Errno;  int rpc_Errno;
 char rpc_Error[STRSIZ];  char rpc_Error[STRSIZ];
   
Line 82  rpc_SetErr(int eno, char *estr, ...) Line 80  rpc_SetErr(int eno, char *estr, ...)
         va_end(lst);          va_end(lst);
 }  }
   
 // ------------------------------------------------------------  
   
 /*  /*
 * rpc_chkPktSession() - Check session in RPC packet * rpc_chkPktSession() - Check RPC session
  *   *
  * @p = packet session   * @p = packet session
  * @s = active session   * @s = active session
 * return: -1 error or 0 ok * return: -1, 1, 2, 3 are errors or 0 ok
  */   */
 inline int  inline int
 rpc_chkPktSession(rpc_sess_t *p, rpc_sess_t *s)  rpc_chkPktSession(rpc_sess_t *p, rpc_sess_t *s)
 {  {
         assert(p && s);  
         if (!p || !s)          if (!p || !s)
                 return -1;                  return -1;
   
Line 109  rpc_chkPktSession(rpc_sess_t *p, rpc_sess_t *s) Line 105  rpc_chkPktSession(rpc_sess_t *p, rpc_sess_t *s)
 }  }
   
 /*  /*
 * rpc_addPktSession() - Add session into RPC packet * rpc_addPktSession() - Prepare session into network format
  *   *
  * @p = packet session   * @p = packet session
 * @s = active session * @s = host session
  * return: -1 error or 0 ok   * return: -1 error or 0 ok
  */   */
 inline int  inline int
 rpc_addPktSession(rpc_sess_t *p, rpc_sess_t *s)  rpc_addPktSession(rpc_sess_t *p, rpc_sess_t *s)
 {  {
         assert(p && s);  
         if (!p || !s)          if (!p || !s)
                 return -1;                  return -1;
   
         p->sess_version = s->sess_version;          p->sess_version = s->sess_version;
         p->sess_timeout = s->sess_timeout;          p->sess_timeout = s->sess_timeout;
         p->sess_program = htonl(s->sess_program);          p->sess_program = htonl(s->sess_program);
        p->sess_process = htonl(s->sess_process);        p->sess_process = htons(s->sess_process);
 
         return 0;
 }
 
 /*
  * rpc_register_srvServices() - Register internal service functions
  *
  * @srv = RPC server instance
  * return: -1 error or 0 ok
  */
 int
 rpc_register_srvServices(rpc_srv_t * __restrict srv)
 {
         if (!srv)
                 return -1;
 
         rpc_srv_registerCall(srv, NULL, CALL_SRVSHUTDOWN, 0);
         rpc_srv_registerCall(srv, NULL, CALL_SRVCLIENTS, 1);
         rpc_srv_registerCall(srv, NULL, CALL_SRVSESSIONS, 4);
         rpc_srv_registerCall(srv, NULL, CALL_SRVCALLS, 1);
   
         return 0;          return 0;
 }  }

Removed from v.1.5  
changed lines
  Added in v.1.5.6.2


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