#include "lock_protocol.h"
#include "lock_client.h"
-#include "rpc.h"
+#include "rpc/rpc.h"
#include <arpa/inet.h>
#include <vector>
#include <stdlib.h>
#include <stdio.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]);
+ return 1;
+ }
- if(argc != 2){
- fprintf(stderr, "Usage: %s [host:]port\n", argv[0]);
- exit(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]);
+ printf ("stat returned %d\n", lc->stat("1"));
}