Diff for /libaitrpc/src/lists.c between versions 1.14.2.1 and 1.16.8.1

version 1.14.2.1, 2013/07/15 14:54:40 version 1.16.8.1, 2015/01/15 20:39:11
Line 12  terms: Line 12  terms:
 All of the documentation and software included in the ELWIX and AITNET  All of the documentation and software included in the ELWIX and AITNET
 Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>  Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>
   
Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013Copyright 2004 - 2015
         by Michael Pounov <misho@elwix.org>.  All rights reserved.          by Michael Pounov <misho@elwix.org>.  All rights reserved.
   
 Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
Line 168  rpc_srv_getBLOB(rpc_srv_t * __restrict srv, uint32_t v Line 168  rpc_srv_getBLOB(rpc_srv_t * __restrict srv, uint32_t v
         return b;          return b;
 }  }
   
 static void *  
 toutBLOB(sched_task_t *task)  
 {  
         rpc_cli_t *c = TASK_ARG(task);  
   
         rpc_srv_unregisterBLOB((rpc_srv_t*) c->cli_parent, (uint32_t) TASK_DATA(task));  
   
         return NULL;  
 }  
   
 /*  /*
  * rpc_srv_registerBLOB() - Register new BLOB to server   * rpc_srv_registerBLOB() - Register new BLOB to server
  *   *
  * @srv = RPC Server instance   * @srv = RPC Server instance
  * @len = BLOB length   * @len = BLOB length
  * @tout = BLOB live timeout in seconds   * @tout = BLOB live timeout in seconds
  * @task = task called this function  
  * return: NULL error or new registered BLOB   * return: NULL error or new registered BLOB
  */   */
 rpc_blob_t *  rpc_blob_t *
rpc_srv_registerBLOB(rpc_srv_t * __restrict srv, size_t len, int toutrpc_srv_registerBLOB(rpc_srv_t * __restrict srv, size_t len, int tout)
                sched_task_t * __restrict task) 
 {  {
         rpc_blob_t *blob = NULL;          rpc_blob_t *blob = NULL;
         struct timespec ts = { tout ? tout : RPC_BLOB_TIMEOUT, 0 };  
   
         if (!srv || !len) {          if (!srv || !len) {
                 rpc_SetErr(EINVAL, "Invalid parameter can`t register BLOB variable");                  rpc_SetErr(EINVAL, "Invalid parameter can`t register BLOB variable");
                 return blob;                  return blob;
         }          }
   
        blob = rpc_srv_blobCreate(srv, len);        blob = rpc_srv_blobCreate(srv, len, tout);
   
         TAILQ_INSERT_TAIL(&srv->srv_blob.blobs, blob, blob_node);          TAILQ_INSERT_TAIL(&srv->srv_blob.blobs, blob, blob_node);
   
         schedTimer(TASK_ROOT(task), toutBLOB, TASK_ARG(task), ts,   
                         (void*) (intptr_t) blob->blob_var, blob->blob_len);  
         return blob;          return blob;
 }  }
   

Removed from v.1.14.2.1  
changed lines
  Added in v.1.16.8.1


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