A few minor changes to server files.
authorroot (spook.local) <root@spook.local>
Sun, 20 May 2012 16:40:08 +0000 (19:40 +0300)
committerroot (spook.local) <root@spook.local>
Sun, 20 May 2012 16:40:08 +0000 (19:40 +0300)
test/server.c
test/server_lf.c

index f165107..c25384a 100644 (file)
@@ -7,7 +7,7 @@
 #include <netinet/in.h>
 #include <stdlib.h>
 
-#define ADDR 0x80BEA8C0
+#define ADDR 0x81BEA8C0
 
 int main(int argc, const char *argv[])
 {
index 1ec8a32..538b352 100644 (file)
@@ -8,7 +8,7 @@
 #include <stdlib.h>
 #include <fcntl.h>
 
-#define ADDR 0x80BEA8C0
+#define ADDR 0x81BEA8C0
 
 int main(int argc, const char *argv[])
 {
@@ -39,7 +39,7 @@ int main(int argc, const char *argv[])
         return -1;
     }
 
-    int fd = open(argv[2], O_RDWR);
+    int fd = open(argv[2], O_RDWR | O_CREAT | O_TRUNC);
     if (fd < 0) {
         perror("Failed to open file");
         close(sock);