ubik-prototype-fallout-20090316
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 16 Mar 2009 12:37:09 +0000 (12:37 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 16 Mar 2009 12:37:09 +0000 (12:37 +0000)
LICENSE IPL10

make things happy again

src/ubik/ubik.c
src/ubik/ubik.p.h
src/ubik/ubikclient.c
src/ubik/udebug.c
src/ubik/vote.c

index d56f52a..dbf50d2 100644 (file)
@@ -968,12 +968,13 @@ ubik_Flush(struct ubik_trans *transPtr)
 }
 
 int
-ubik_Write(register struct ubik_trans *transPtr, void *buffer,
+ubik_Write(register struct ubik_trans *transPtr, void *vbuffer,
           afs_int32 length)
 {
     struct ubik_iovec *iovec;
     afs_int32 code, error = 0;
     afs_int32 pos, len, size;
+    char * buffer = (char *)vbuffer;
 
     if (transPtr->type != UBIK_WRITETRANS)
        return UBADTYPE;
index fb10239..627152f 100644 (file)
@@ -183,7 +183,7 @@ struct ubik_dbase {
     int (*sync) (struct ubik_dbase * adbase, afs_int32 afile);
     int (*stat) (struct ubik_dbase * adbase, afs_int32 afid,
                 struct ubik_stat * astat);
-    int (*open) (struct ubik_dbase * adbase, afs_int32 afid);
+    void (*open) (struct ubik_dbase * adbase, afs_int32 afid);
     int (*setlabel) (struct ubik_dbase * adbase, afs_int32 afile, struct ubik_version * aversion);     /*!< set the version label */
     int (*getlabel) (struct ubik_dbase * adbase, afs_int32 afile, struct ubik_version * aversion);     /*!< retrieve the version label */
     int (*getnfiles) (struct ubik_dbase * adbase);     /*!< find out number of files */
@@ -192,8 +192,8 @@ struct ubik_dbase {
 #ifdef AFS_PTHREAD_ENV
     pthread_cond_t version_cond;    /*!< condition variable to manage changes to version */
     pthread_cond_t flags_cond;      /*!< condition variable to manage changes to flags */
-  pthread_mutex_t version_mutex;
-  pthread_mutex_t flags_mutex;
+    pthread_mutex_t version_mutex;
+    pthread_mutex_t flags_mutex;
 #endif
 };
 
index 2f120d7..78131e5 100644 (file)
@@ -33,13 +33,13 @@ RCSID
 #include <afs/pthread_glock.h>
 #include <stdio.h>
 #include <string.h>
-#include <unistd.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <lock.h>
 #ifdef AFS_NT40_ENV
 #include <winsock2.h>
 #else
+#include <unistd.h>
 #include <netdb.h>
 #include <netinet/in.h>
 #endif
index a416366..30f5a26 100644 (file)
@@ -147,7 +147,7 @@ CommandProc(struct cmd_syndesc *as, void *arock)
     if (code == RXGEN_OPCODE) {
        oldServer = 1;          /* talking to a pre 3.5 server */
        memset(&udebug, 0, sizeof(udebug));
-       code = VOTE_DebugOld(tconn, &udebug);
+       code = VOTE_DebugOld(tconn, (ubik_debug_old *)&udebug);
     }
 
     if (code) {
@@ -276,7 +276,7 @@ CommandProc(struct cmd_syndesc *as, void *arock)
            if (code < 0) {
                if (oldServer) {        /* pre 3.5 server */
                    memset(&usdebug, 0, sizeof(usdebug));
-                   code = VOTE_SDebugOld(tconn, i, &usdebug);
+                   code = VOTE_SDebugOld(tconn, i, (ubik_sdebug_old *)&usdebug);
                } else
                    code = VOTE_SDebug(tconn, i, &usdebug);
            }
index 0689b3f..fecc3f6 100644 (file)
@@ -20,13 +20,13 @@ RCSID
 #include <sys/file.h>
 #include <netinet/in.h>
 #endif
-#include <afs/afsutil.h>
 #include <lock.h>
 #include <string.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <afs/afsutil.h>
 #include <time.h>
+#include <stdarg.h>
 
 #define UBIK_INTERNALS
 #include "ubik.h"
@@ -506,11 +506,11 @@ SVOTE_DebugOld(struct rx_call * rxcall,
     aparm->syncTime = syncTime;
 
     aparm->amSyncSite = ubik_amSyncSite;
-    ubeacon_Debug(aparm);
+    ubeacon_Debug((ubik_debug *)aparm);
 
-    udisk_Debug(aparm);
+    udisk_Debug((ubik_debug *)aparm);
 
-    ulock_Debug(aparm);
+    ulock_Debug((ubik_debug *)aparm);
 
     /* Get the recovery state. The label of the database may not have 
      * been written yet but set the flag so udebug behavior remains.