Diff for /fwsync/driver/fwsync_workers.c between versions 1.4 and 1.6

version 1.4, 2022/07/11 15:59:42 version 1.6, 2022/07/15 09:19:25
Line 5 Line 5
 #include "fwsync.h"  #include "fwsync.h"
   
   
   static int
   fwsync_add_state_4(const struct fws_proto *pkt)
   {
           DTRACE();
   
           return 0;
   }
   
   static int
   fwsync_add_state_6(const struct fws_proto *pkt)
   {
           DTRACE();
   
           return 0;
   }
   
   int
   fwsync_add_state(const struct fws_proto *pkt)
   {
           DTRACE();
   
           if (pkt->fws_addrtype == 4)
                   fwsync_add_state_4(pkt);
           else if (pkt->fws_addrtype == 6)
                   fwsync_add_state_6(pkt);
           else
                   return EINVAL;
   
           return 0;
   }
   
   int
   fwsync_add_alias(const struct fws_proto *pkt)
   {
           DTRACE();
   
           return 0;
   }
   
   
 void  void
 fwsync_sndpkt_handler(void *context, int pending)  fwsync_sndpkt_handler(void *context, int pending)
 {  {
Line 88  fwsync_state_handler(const void *arg) Line 128  fwsync_state_handler(const void *arg)
   
         mtx_lock(&fws_mtx_c);          mtx_lock(&fws_mtx_c);
   
        p = malloc(sizeof(struct fws_proto), M_FWSYNC, M_NOWAIT | M_ZERO);        p = malloc(sizeof(struct fws_sndpkt), M_FWSYNC, M_NOWAIT | M_ZERO);
         if (!p) {          if (!p) {
                 mtx_unlock(&fws_mtx_c);                  mtx_unlock(&fws_mtx_c);
                 return 0;                  return 0;
Line 141  fwsync_alias_handler(const void *arg) Line 181  fwsync_alias_handler(const void *arg)
   
         mtx_lock(&fws_mtx_c);          mtx_lock(&fws_mtx_c);
   
        p = malloc(sizeof(struct fws_proto), M_FWSYNC, M_NOWAIT | M_ZERO);        p = malloc(sizeof(struct fws_sndpkt), M_FWSYNC, M_NOWAIT | M_ZERO);
         if (!p) {          if (!p) {
                 mtx_unlock(&fws_mtx_c);                  mtx_unlock(&fws_mtx_c);
                 return 0;                  return 0;

Removed from v.1.4  
changed lines
  Added in v.1.6


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