More clean-ups and cool template stuff
[invirt/third/libt4.git] / lock_server.cc
index a82231e..cac6a90 100644 (file)
@@ -6,7 +6,7 @@
 #include <arpa/inet.h>
 #include "lang/verify.h"
 #include "handle.h"
 #include <arpa/inet.h>
 #include "lang/verify.h"
 #include "handle.h"
-#include "tprintf.h"
+#include "threaded_log.h"
 #include "rpc/marshall.h"
 #include "lock.h"
 
 #include "rpc/marshall.h"
 #include "lock.h"
 
@@ -74,7 +74,7 @@ void lock_server::revoker() [[noreturn]] {
         proxy = handle(held_by.first).safebind();
         if (proxy) {
             int r;
         proxy = handle(held_by.first).safebind();
         if (proxy) {
             int r;
-            rlock_protocol::status ret = proxy->call(rlock_protocol::revoke, r, lid, held_by.second);
+            auto ret = (rlock_protocol::status)proxy->call(rlock_protocol::revoke, r, lid, held_by.second);
             LOG("Revoke returned " << ret);
         }
     }
             LOG("Revoke returned " << ret);
         }
     }
@@ -97,8 +97,6 @@ void lock_server::retryer() [[noreturn]] {
             front = st.wanted_by.front();
         }
 
             front = st.wanted_by.front();
         }
 
-        rlock_protocol::status ret = -1;
-
         rpcc *proxy = NULL;
         // try a few times?
         //int t=5;
         rpcc *proxy = NULL;
         // try a few times?
         //int t=5;
@@ -106,7 +104,7 @@ void lock_server::retryer() [[noreturn]] {
         proxy = handle(front.first).safebind();
         if (proxy) {
             int r;
         proxy = handle(front.first).safebind();
         if (proxy) {
             int r;
-            ret = proxy->call(rlock_protocol::retry, r, lid, front.second);
+            auto ret = (rlock_protocol::status)proxy->call(rlock_protocol::retry, r, lid, front.second);
             LOG("Retry returned " << ret);
         }
     }
             LOG("Retry returned " << ret);
         }
     }