Diff for /libaitrpc/src/lists.c between versions 1.1.2.3 and 1.1.2.4

version 1.1.2.3, 2010/06/24 11:01:46 version 1.1.2.4, 2010/06/24 15:01:19
Line 2 Line 2
   
   
 /*  /*
    * rpc_srv_retValsCall() Declare return variables for RPC call and zeroed values
                                           (for safe handling return values, use this!)
    * @call = RPC function call
    * @return_vals = Number of return variables
    * return: NULL error, !=NULL array with return values for RPC call with return_vals items
    */
   inline rpc_val_t *
   rpc_srv_retValsCall(rpc_func_t * __restrict call, int return_vals)
   {
           rpc_val_t *v = NULL;
   
           if (rpc_srv_declValsCall(call, return_vals) == -1)
                   return NULL;
           else
                   rpc_srv_zeroValsCall(call);
           if (rpc_srv_getValsCall(call, &v) == -1)
                   return NULL;
   
           return v;
   }
   
   /*
  * rpc_srv_freeValsCall() Free return variables for RPC call   * rpc_srv_freeValsCall() Free return variables for RPC call
  * @call = RPC function call   * @call = RPC function call
  * return: none   * return: none
Line 13  rpc_srv_freeValsCall(rpc_func_t * __restrict call) Line 35  rpc_srv_freeValsCall(rpc_func_t * __restrict call)
 }  }
   
 /*  /*
 * rpc_srv_declValsCall() Declare return variables for RPC call * rpc_srv_declValsCall() Declare return variables for RPC call
                                 if already allocated memory for RPC call return values 
                                 function reallocate used space with return_vals count elements
  * @call = RPC function call   * @call = RPC function call
  * @return_vals = Number of return variables   * @return_vals = Number of return variables
  * return: -1 error, !=-1 ok   * return: -1 error, !=-1 ok
Line 47  rpc_srv_declValsCall(rpc_func_t * __restrict call, int Line 71  rpc_srv_declValsCall(rpc_func_t * __restrict call, int
 }  }
   
 /*  /*
 * rpc_srv_delValsCall() Clean values from return variables of RPC call * rpc_srv_zeroValsCall() Clean values from return variables of RPC call
  * @call = RPC function call   * @call = RPC function call
  * return: -1 error, !=-1 Returned number of cleaned RPC variables   * return: -1 error, !=-1 Returned number of cleaned RPC variables
  */   */
 inline int  inline int
rpc_srv_delValsCall(rpc_func_t * __restrict call)rpc_srv_zeroValsCall(rpc_func_t * __restrict call)
 {  {
         if (!call) {          if (!call) {
                 rpc_SetErr(EINVAL, "Error:: Invalid parameter can`t delete return variables ...\n");                  rpc_SetErr(EINVAL, "Error:: Invalid parameter can`t delete return variables ...\n");
Line 143  rpc_srv_registerCall(rpc_srv_t * __restrict srv, const Line 167  rpc_srv_registerCall(rpc_srv_t * __restrict srv, const
   
         func->func_tag = crcFletcher16((u_short*) str, (MAXPATHLEN + UCHAR_MAX + 1) / 2);          func->func_tag = crcFletcher16((u_short*) str, (MAXPATHLEN + UCHAR_MAX + 1) / 2);
         func->func_hash = hash_fnv((char*) str, MAXPATHLEN + UCHAR_MAX + 1);          func->func_hash = hash_fnv((char*) str, MAXPATHLEN + UCHAR_MAX + 1);
   
           func->func_parent = srv;
   
         if (rpc_srv_declValsCall(func, args) == -1) {          if (rpc_srv_declValsCall(func, args) == -1) {
                 free(func);                  free(func);

Removed from v.1.1.2.3  
changed lines
  Added in v.1.1.2.4


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