Diff for /libaitrpc/src/srv.c between versions 1.29 and 1.30.2.2

version 1.29, 2016/08/08 13:21:13 version 1.30.2.2, 2022/10/13 22:09:36
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 - 2016Copyright 2004 - 2022
         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 424  acceptClients(sched_task_t *task) Line 424  acceptClients(sched_task_t *task)
                 AIT_FREE_VAL(&c->cli_buf);                  AIT_FREE_VAL(&c->cli_buf);
                 array_Del(srv->srv_clients, c->cli_id, 42);                  array_Del(srv->srv_clients, c->cli_id, 42);
                 goto end;                  goto end;
        } else        } else {
                 fcntl(c->cli_sock, F_SETFL, fcntl(c->cli_sock, F_GETFL) | O_NONBLOCK);                  fcntl(c->cli_sock, F_SETFL, fcntl(c->cli_sock, F_GETFL) | O_NONBLOCK);
                   fcntl(c->cli_sock, F_SETFD, FD_CLOEXEC);
           }
   
 #ifdef TCP_SESSION_TIMEOUT  #ifdef TCP_SESSION_TIMEOUT
         /* armed timer for close stateless connection */          /* armed timer for close stateless connection */
Line 542  rxUDPPacket(sched_task_t *task) Line 544  rxUDPPacket(sched_task_t *task)
         /* check integrity of packet */          /* check integrity of packet */
         crc = ntohs(rpc->call_crc);          crc = ntohs(rpc->call_crc);
         rpc->call_crc ^= rpc->call_crc;          rpc->call_crc ^= rpc->call_crc;
        if (crc != crcFletcher16((u_short*) rpc, len / 2))        if (crc != crcFletcher16((u_short*) AIT_GET_BUF(&b), len / 2))
                 goto end;                  goto end;
   
         /* check RPC packet session info */          /* check RPC packet session info */
Line 706  rxRAWPacket(sched_task_t *task) Line 708  rxRAWPacket(sched_task_t *task)
         /* check integrity of packet */          /* check integrity of packet */
         crc = ntohs(rpc->call_crc);          crc = ntohs(rpc->call_crc);
         rpc->call_crc ^= rpc->call_crc;          rpc->call_crc ^= rpc->call_crc;
        if (crc != crcFletcher16((u_short*) rpc, len / 2))        if (crc != crcFletcher16((u_short*) AIT_GET_BUF(&b), len / 2))
                 goto end;                  goto end;
   
         /* check RPC packet session info */          /* check RPC packet session info */
Line 1264  acceptBLOBClients(sched_task_t *task) Line 1266  acceptBLOBClients(sched_task_t *task)
                 setsockopt(c->cli_sock, IPPROTO_TCP, TCP_NOPUSH, &n, sizeof n);                  setsockopt(c->cli_sock, IPPROTO_TCP, TCP_NOPUSH, &n, sizeof n);
 #endif  #endif
                 fcntl(c->cli_sock, F_SETFL, fcntl(c->cli_sock, F_GETFL) | O_NONBLOCK);                  fcntl(c->cli_sock, F_SETFL, fcntl(c->cli_sock, F_GETFL) | O_NONBLOCK);
                   fcntl(c->cli_sock, F_SETFD, FD_CLOEXEC);
         }          }
   
         schedRead(TASK_ROOT(task), rxBLOB, c, c->cli_sock, NULL, 0);          schedRead(TASK_ROOT(task), rxBLOB, c, c->cli_sock, NULL, 0);

Removed from v.1.29  
changed lines
  Added in v.1.30.2.2


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