Remove support for Solaris pre-8
[openafs.git] / src / afs / afs_volume.c
index d0d5c3b..f2148a5 100644 (file)
 #include "afs/afs_stats.h"     /* afs statistics */
 #include "afs/afs_dynroot.h"
 
-#if    defined(AFS_SUN56_ENV)
+#if    defined(AFS_SUN5_ENV)
 #include <inet/led.h>
 #include <inet/common.h>
-#if     defined(AFS_SUN58_ENV)
 #include <netinet/ip6.h>
-#endif
 #include <inet/ip.h>
 #endif
 
@@ -739,6 +737,7 @@ afs_NewVolumeByName(char *aname, afs_int32 acell, int agood,
     char *tbuffer, *ve;
     struct afs_conn *tconn;
     struct vrequest treq;
+    struct rx_connection *rxconn;
 
     if (strlen(aname) > VL_MAXNAMELEN) /* Invalid volume name */
        return NULL;
@@ -763,45 +762,45 @@ afs_NewVolumeByName(char *aname, afs_int32 acell, int agood,
     do {
        tconn =
            afs_ConnByMHosts(tcell->cellHosts, tcell->vlport, tcell->cellNum,
-                            &treq, SHARED_LOCK);
+                            &treq, SHARED_LOCK, &rxconn);
        if (tconn) {
-           if (tconn->srvr->server->flags & SNO_LHOSTS) {
+           if (tconn->parent->srvr->server->flags & SNO_LHOSTS) {
                type = 0;
                RX_AFS_GUNLOCK();
-               code = VL_GetEntryByNameO(tconn->id, aname, tve);
+               code = VL_GetEntryByNameO(rxconn, aname, tve);
                RX_AFS_GLOCK();
-           } else if (tconn->srvr->server->flags & SYES_LHOSTS) {
+           } else if (tconn->parent->srvr->server->flags & SYES_LHOSTS) {
                type = 1;
                RX_AFS_GUNLOCK();
-               code = VL_GetEntryByNameN(tconn->id, aname, ntve);
+               code = VL_GetEntryByNameN(rxconn, aname, ntve);
                RX_AFS_GLOCK();
            } else {
                type = 2;
                RX_AFS_GUNLOCK();
-               code = VL_GetEntryByNameU(tconn->id, aname, utve);
+               code = VL_GetEntryByNameU(rxconn, aname, utve);
                RX_AFS_GLOCK();
-               if (!(tconn->srvr->server->flags & SVLSRV_UUID)) {
+               if (!(tconn->parent->srvr->server->flags & SVLSRV_UUID)) {
                    if (code == RXGEN_OPCODE) {
                        type = 1;
                        RX_AFS_GUNLOCK();
-                       code = VL_GetEntryByNameN(tconn->id, aname, ntve);
+                       code = VL_GetEntryByNameN(rxconn, aname, ntve);
                        RX_AFS_GLOCK();
                        if (code == RXGEN_OPCODE) {
                            type = 0;
-                           tconn->srvr->server->flags |= SNO_LHOSTS;
+                           tconn->parent->srvr->server->flags |= SNO_LHOSTS;
                            RX_AFS_GUNLOCK();
-                           code = VL_GetEntryByNameO(tconn->id, aname, tve);
+                           code = VL_GetEntryByNameO(rxconn, aname, tve);
                            RX_AFS_GLOCK();
                        } else if (!code)
-                           tconn->srvr->server->flags |= SYES_LHOSTS;
+                           tconn->parent->srvr->server->flags |= SYES_LHOSTS;
                    } else if (!code)
-                       tconn->srvr->server->flags |= SVLSRV_UUID;
+                       tconn->parent->srvr->server->flags |= SVLSRV_UUID;
                }
                lastnvcode = code;
            }
        } else
            code = -1;
-    } while (afs_Analyze(tconn, code, NULL, &treq, -1, /* no op code for this */
+    } while (afs_Analyze(tconn, rxconn, code, NULL, &treq, -1, /* no op code for this */
                         SHARED_LOCK, tcell));
 
     if (code) {
@@ -846,14 +845,14 @@ afs_NewVolumeByName(char *aname, afs_int32 acell, int agood,
        ve = (char *)ntve;
     else
        ve = (char *)tve;
-    tv = afs_SetupVolume(0, aname, ve, tcell, agood, type, areq);
+    tv = afs_SetupVolume(0, aname, ve, tcell, agood, type, &treq);
     if ((agood == 3) && tv && tv->backVol) {
        /*
         * This means that very soon we'll ask for the BK volume so
         * we'll prefetch it (well we did already.)
         */
        tv1 =
-           afs_SetupVolume(tv->backVol, (char *)0, ve, tcell, 0, type, areq);
+           afs_SetupVolume(tv->backVol, (char *)0, ve, tcell, 0, type, &treq);
        if (tv1) {
            tv1->refCount--;
        }
@@ -863,7 +862,7 @@ afs_NewVolumeByName(char *aname, afs_int32 acell, int agood,
         * This means that very soon we'll ask for the RO volume so
         * we'll prefetch it (well we did already.)
         */
-       tv1 = afs_SetupVolume(tv->roVol, NULL, ve, tcell, 0, type, areq);
+       tv1 = afs_SetupVolume(tv->roVol, NULL, ve, tcell, 0, type, &treq);
        if (tv1) {
            tv1->refCount--;
        }
@@ -1113,6 +1112,7 @@ InstallUVolumeEntry(struct volume *av, struct uvldbentry *ve, int acell,
                bulkaddrs addrs;
                ListAddrByAttributes attrs;
                afsUUID uuid;
+               struct rx_connection *rxconn;
 
                memset(&attrs, 0, sizeof(attrs));
                attrs.Mask = VLADDR_UUID;
@@ -1122,11 +1122,12 @@ InstallUVolumeEntry(struct volume *av, struct uvldbentry *ve, int acell,
                do {
                    tconn =
                        afs_ConnByMHosts(tcell->cellHosts, tcell->vlport,
-                                        tcell->cellNum, areq, SHARED_LOCK);
+                                        tcell->cellNum, areq, SHARED_LOCK,
+                                        &rxconn);
                    if (tconn) {
                        RX_AFS_GUNLOCK();
                        code =
-                           VL_GetAddrsU(tconn->id, &attrs, &uuid, &unique,
+                           VL_GetAddrsU(rxconn, &attrs, &uuid, &unique,
                                         &nentries, &addrs);
                        RX_AFS_GLOCK();
                    } else {
@@ -1138,7 +1139,7 @@ InstallUVolumeEntry(struct volume *av, struct uvldbentry *ve, int acell,
                        code = VL_NOENT;
 
                } while (afs_Analyze
-                        (tconn, code, NULL, areq, -1, SHARED_LOCK, tcell));
+                        (tconn, rxconn, code, NULL, areq, -1, SHARED_LOCK, tcell));
                if (code) {
                    /* Better handing of such failures; for now we'll simply retry this call */
                    areq->volumeError = 1;