Cleanups
[invirt/third/libt4.git] / lock_demo.cc
index 4d74acb..3a85949 100644 (file)
@@ -1,30 +1,16 @@
-//
-// Lock demo
-//
-
-#include "lock_protocol.h"
 #include "lock_client.h"
-#include "rpc.h"
-#include <arpa/inet.h>
-#include <vector>
-#include <stdlib.h>
-#include <stdio.h>
+#include "tprintf.h"
 
-std::string dst;
-lock_client *lc;
+char tprintf_thread_prefix = 'd';
 
 int
 main(int argc, char *argv[])
 {
-  int r;
-
-  if(argc != 2){
-    fprintf(stderr, "Usage: %s [host:]port\n", argv[0]);
-    exit(1);
-  }
+    if(argc != 2) {
+        fprintf(stderr, "Usage: %s [host:]port\n", argv[0]);
+        return 1;
+    }
 
-  dst = argv[1];
-  lc = new lock_client(dst);
-  r = lc->stat(1);
-  printf ("stat returned %d\n", r);
+    lock_client *lc = new lock_client(argv[1]);
+    LOG_NONMEMBER("stat returned " << lc->stat("1"));
 }