LINUX 5.3.0: Use send_sig instead of force_sig
[openafs.git] / src / rx / rx_kcommon.c
index 110ba60..c2cc187 100644 (file)
@@ -365,9 +365,8 @@ rxi_InitPeerParams(struct rx_peer *pp)
 {
     u_short rxmtu;
 
-#ifdef ADAPT_MTU
-# ifndef AFS_SUN5_ENV
-#  ifdef AFS_USERSPACE_IP_ADDR
+#ifndef AFS_SUN5_ENV
+# ifdef AFS_USERSPACE_IP_ADDR
     afs_int32 i;
     afs_int32 mtu;
 
@@ -387,25 +386,25 @@ rxi_InitPeerParams(struct rx_peer *pp)
                pp->ifMTU = rxmtu;
        }
     }
-#  else /* AFS_USERSPACE_IP_ADDR */
+# else /* AFS_USERSPACE_IP_ADDR */
     rx_ifnet_t ifn;
 
-#   if !defined(AFS_SGI62_ENV)
+#  if !defined(AFS_SGI62_ENV)
     if (numMyNetAddrs == 0)
        (void)rxi_GetIFInfo();
-#   endif
+#  endif
 
     ifn = rxi_FindIfnet(pp->host, NULL);
     if (ifn) {
        rx_rto_setPeerTimeoutSecs(pp, 2);
        pp->ifMTU = MIN(RX_MAX_PACKET_SIZE, rx_MyMaxSendSize);
-#   ifdef IFF_POINTOPOINT
+#  ifdef IFF_POINTOPOINT
        if (rx_ifnet_flags(ifn) & IFF_POINTOPOINT) {
            /* wish we knew the bit rate and the chunk size, sigh. */
            rx_rto_setPeerTimeoutSecs(pp, 4);
            pp->ifMTU = RX_PP_PACKET_SIZE;
        }
-#   endif /* IFF_POINTOPOINT */
+#  endif /* IFF_POINTOPOINT */
        /* Diminish the packet size to one based on the MTU given by
         * the interface. */
        if (rx_ifnet_mtu(ifn) > (RX_IPUDP_SIZE + RX_HEADER_SIZE)) {
@@ -417,8 +416,8 @@ rxi_InitPeerParams(struct rx_peer *pp)
        rx_rto_setPeerTimeoutSecs(pp, 3);
        pp->ifMTU = MIN(RX_REMOTE_PACKET_SIZE, rx_MyMaxSendSize);
     }
-#  endif /* else AFS_USERSPACE_IP_ADDR */
-# else /* AFS_SUN5_ENV */
+# endif /* else AFS_USERSPACE_IP_ADDR */
+#else /* AFS_SUN5_ENV */
     afs_int32 mtu;
 
     mtu = rxi_FindIfMTU(pp->host);
@@ -438,11 +437,7 @@ rxi_InitPeerParams(struct rx_peer *pp)
                pp->ifMTU = rxmtu;
        }
     }
-# endif /* AFS_SUN5_ENV */
-#else /* ADAPT_MTU */
-    rx_rto_setPeerTimeoutSecs(pp, 2);
-    pp->ifMTU = OLD_MAX_PACKET_SIZE;
-#endif /* else ADAPT_MTU */
+#endif /* AFS_SUN5_ENV */
     pp->ifMTU = rxi_AdjustIfMTU(pp->ifMTU);
     pp->maxMTU = OLD_MAX_PACKET_SIZE;  /* for compatibility with old guys */
     pp->natMTU = MIN(pp->ifMTU, OLD_MAX_PACKET_SIZE);
@@ -594,7 +589,7 @@ rxi_Findcbi(afs_uint32 addr)
 
 #else /* AFS_USERSPACE_IP_ADDR */
 
-#if !defined(AFS_AIX41_ENV) && !defined(AFS_DUX40_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
+#if !defined(AFS_AIX41_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
 #define IFADDR2SA(f) (&((f)->ifa_addr))
 #else /* AFS_AIX41_ENV */
 #define IFADDR2SA(f) ((f)->ifa_addr)
@@ -888,11 +883,7 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport)
     memcpy((caddr_t) bindnam->b_rptr + SO_MSGOFFSET, (caddr_t) & myaddr,
           addrsize);
     bindnam->b_wptr = bindnam->b_rptr + (addrsize + SO_MSGOFFSET + 1);
-#if defined(AFS_NBSD40_ENV)
-    code = sobind(newSocket, bindnam, addrsize, osi_curproc());
-#else
     code = sobind(newSocket, bindnam, addrsize);
-#endif
     if (code) {
        soclose(newSocket);
 #if !defined(AFS_HPUX1122_ENV)
@@ -945,11 +936,7 @@ rxk_NewSocketHost(afs_uint32 ahost, short aport)
        goto bad;
     }
 #else /* defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) */
-#ifdef  AFS_OSF_ENV
-    nam = m_getclr(M_WAIT, MT_SONAME);
-#else /* AFS_OSF_ENV */
     nam = m_get(M_WAIT, MT_SONAME);
-#endif
     if (nam == NULL) {
 #if defined(KERNEL_HAVE_UERROR)
        setuerror(ENOBUFS);
@@ -1210,6 +1197,7 @@ rxk_Listener(void)
 #ifdef AFS_LINUX20_ENV
     rxk_ListenerPid = current->pid;
     rxk_ListenerTask = current;
+    allow_signal(SIGKILL);    /* Allowed, but blocked until shutdown */
 #endif
 #ifdef AFS_SUN5_ENV
     rxk_ListenerPid = 1;       /* No PID, just a flag that we're alive */
@@ -1304,7 +1292,7 @@ osi_Panic(char *msg, ...)
        icmn_err(CE_PANIC, msg, ap);
        va_end(ap);
     }
-#elif defined(AFS_DARWIN80_ENV) || (defined(AFS_LINUX22_ENV) && !defined(AFS_LINUX_26_ENV))
+#elif defined(AFS_DARWIN80_ENV) || defined(AFS_LINUX22_ENV) || defined(AFS_FBSD_ENV) || defined(UKERNEL)
     char buf[256];
     va_list ap;
     if (!msg)
@@ -1314,7 +1302,7 @@ osi_Panic(char *msg, ...)
     vsnprintf(buf, sizeof(buf), msg, ap);
     va_end(ap);
     printf("%s", buf);
-    panic(buf);
+    panic("%s", buf);
 #else
     va_list ap;
     if (!msg)
@@ -1326,7 +1314,7 @@ osi_Panic(char *msg, ...)
 # ifdef AFS_LINUX20_ENV
     * ((char *) 0) = 0;
 # else
-    panic(msg);
+    panic("%s", msg);
 # endif
 #endif
 }