about summary refs log tree commit diff stats
path: root/src/handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/handlers.c')
-rw-r--r--src/handlers.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/handlers.c b/src/handlers.c
index 4162926..788934d 100644
--- a/src/handlers.c
+++ b/src/handlers.c
@@ -1,26 +1,27 @@
+#include <stdlib.h>
 #include <sys/socket.h>
 #include "handlers.h"
 
-void read_req_resp(nbd_nbtpd_args args) {
-	if (args.path[0] == 0) {
+void *read_req_resp(void *args) {
+	if ((*(nbd_nbtpd_args *)args).path[0] == 0) {
 		nbd_nbtpd_resp_error(args);
-		return;
+		return (void *)NULL;
 	}
-	return;
+	return (void *)NULL;
 }
 
-void write_req_resp(nbd_nbtpd_args args) {
-	if (args.path[0] == 0) {
+void *write_req_resp(void *args) {
+	if ((*(nbd_nbtpd_args *)args).path[0] == 0) {
 		nbd_nbtpd_resp_error(args);
-		return;
+		return (void *)NULL;
 	}
-	return;
+	return (void *)NULL;
 }
 
-void nbd_nbtpd_resp_error(nbd_nbtpd_args args) {
-	if (args.path[0] == 0) {
-		return;
+void *nbd_nbtpd_resp_error(void *args) {
+	if ((*(nbd_nbtpd_args *)args).path[0] == 0) {
+		return (void *)NULL;
 	}
-	return;
+	return (void *)NULL;
 }