diff src/proto.raw.c @ 27:5ba185ca7102

Fixed error checking during initialization, restructured code a bit to make it even simpler
author Ivo Smits <Ivo@UCIS.nl>
date Sat, 09 Apr 2011 17:36:48 +0200
parents 65c01f57bdce
children d9f5caa13898
line wrap: on
line diff
--- a/src/proto.raw.c	Fri Apr 08 17:08:04 2011 +0200
+++ b/src/proto.raw.c	Sat Apr 09 17:36:48 2011 +0200
@@ -35,28 +35,21 @@
 	return len;
 }
 
-#ifdef COMBINED_BINARY
-	int tunmain_raw() {
-#else
-	int tunmain() {
-#endif
-	struct qtproto p = {
-		0,
-		MAX_PACKET_LEN,
-		MAX_PACKET_LEN,
-		0,
-		0,
-		decode,
-		encode,
-		NULL,
-		0,
-	};
-	return qtrun(&p);
-}
+struct qtproto qtproto_raw = {
+	0,
+	MAX_PACKET_LEN,
+	MAX_PACKET_LEN,
+	0,
+	0,
+	decode,
+	encode,
+	NULL,
+	0,
+};
 
 #ifndef COMBINED_BINARY
 int main() {
 	print_header();
-	return tunmain();
+	return qtrun(&qtproto_raw);
 }
 #endif