Diff for /libaitrpc/src/srv.c between versions 1.30.2.10 and 1.31

version 1.30.2.10, 2024/02/26 18:25:32 version 1.31, 2024/03/20 17:32:31
Line 147  _allocClient(rpc_srv_t * __restrict srv, sockaddr_t *  Line 147  _allocClient(rpc_srv_t * __restrict srv, sockaddr_t * 
   
                 /* alloc empty buffer */                  /* alloc empty buffer */
                 AIT_SET_BUFSIZ(&c->cli_buf, 0, srv->srv_netbuf);                  AIT_SET_BUFSIZ(&c->cli_buf, 0, srv->srv_netbuf);
                   if (!AIT_GET_BUF(&c->cli_buf)) {
                           array_Del(srv->srv_clients, n, 0);
                           e_free(c);
                           c = NULL;
                   }
         }          }
   
         return c;          return c;
Line 308  rxPacket(sched_task_t *task) Line 313  rxPacket(sched_task_t *task)
 {  {
         rpc_cli_t *c = TASK_ARG(task);          rpc_cli_t *c = TASK_ARG(task);
         rpc_srv_t *s = c->cli_parent;          rpc_srv_t *s = c->cli_parent;
        int len, noreply = 0, rlen = AIT_LEN(&c->cli_buf);        int len, noreply = 0, rlen;
 #if 0  #if 0
         u_short crc;          u_short crc;
 #endif  #endif
Line 998  rxEXTPacket(sched_task_t *task) Line 1003  rxEXTPacket(sched_task_t *task)
 {  {
         rpc_srv_t *srv = TASK_ARG(task);          rpc_srv_t *srv = TASK_ARG(task);
         rpc_cli_t *c = NULL;          rpc_cli_t *c = NULL;
        int len, noreply = 0, rlen = AIT_LEN(&c->cli_buf);        int len, noreply = 0, rlen;
         struct tagRPCCall *rpc;          struct tagRPCCall *rpc;
         struct timespec ts = { DEF_RPC_TIMEOUT, 0 };          struct timespec ts = { DEF_RPC_TIMEOUT, 0 };
         sockaddr_t sa;          sockaddr_t sa;
Line 1566  rpc_srv_initServer(u_char InstID, int concurentClients Line 1571  rpc_srv_initServer(u_char InstID, int concurentClients
                 pthread_mutex_destroy(&srv->srv_funcs.mtx);                  pthread_mutex_destroy(&srv->srv_funcs.mtx);
                 e_free(srv);                  e_free(srv);
                 return NULL;                  return NULL;
        } else        }
                schedSignalDispatch(srv->srv_root, 42); 
   
         /* init pool for clients */          /* init pool for clients */
         srv->srv_clients = array_Init(concurentClients);          srv->srv_clients = array_Init(concurentClients);
Line 1689  rpc_srv_loopServer(rpc_srv_t * __restrict srv) Line 1693  rpc_srv_loopServer(rpc_srv_t * __restrict srv)
         schedPolling(srv->srv_root, &ts, NULL);          schedPolling(srv->srv_root, &ts, NULL);
         /* main rpc loop */          /* main rpc loop */
         schedRun(srv->srv_root, &srv->srv_kill);          schedRun(srv->srv_root, &srv->srv_kill);
         schedSignalDispatch(srv->srv_root, 0);  
   
         /* close all clients connections & server socket */          /* close all clients connections & server socket */
         for (i = 0; i < array_Size(srv->srv_clients); i++) {          for (i = 0; i < array_Size(srv->srv_clients); i++) {
Line 1828  rpc_srv_initServer2(u_char InstID, int concurentClient Line 1831  rpc_srv_initServer2(u_char InstID, int concurentClient
                 pthread_mutex_destroy(&srv->srv_funcs.mtx);                  pthread_mutex_destroy(&srv->srv_funcs.mtx);
                 e_free(srv);                  e_free(srv);
                 return NULL;                  return NULL;
        } else        }
                schedSignalDispatch(srv->srv_root, 42); 
   
         /* init pool for clients */          /* init pool for clients */
         srv->srv_clients = array_Init(concurentClients);          srv->srv_clients = array_Init(concurentClients);
Line 1947  rpc_srv_initServerExt(u_char InstID, int netBuf, int f Line 1949  rpc_srv_initServerExt(u_char InstID, int netBuf, int f
                 pthread_mutex_destroy(&srv->srv_funcs.mtx);                  pthread_mutex_destroy(&srv->srv_funcs.mtx);
                 e_free(srv);                  e_free(srv);
                 return NULL;                  return NULL;
        } else        }
                schedSignalDispatch(srv->srv_root, 42); 
   
         /* init pool for clients */          /* init pool for clients */
         srv->srv_clients = array_Init(1);          srv->srv_clients = array_Init(1);

Removed from v.1.30.2.10  
changed lines
  Added in v.1.31


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