From 0d0039674fefbfc14eb41f3bdbec7bf3e6dba9a5 Mon Sep 17 00:00:00 2001
From: Adam Ierymenko <adam.ierymenko@gmail.com>
Date: Wed, 30 Sep 2015 14:48:07 -0700
Subject: Add new verb names, and fix some Mac compiler flags.

---
 make-mac.mk     |  4 ++--
 node/Packet.cpp |  6 ++++++
 node/Packet.hpp | 11 ++---------
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/make-mac.mk b/make-mac.mk
index c0b3f89d..6daa6aa0 100644
--- a/make-mac.mk
+++ b/make-mac.mk
@@ -58,8 +58,8 @@ ifeq ($(ZT_DEBUG),1)
 	# C25519 in particular is almost UNUSABLE in heavy testing without it.
 ext/lz4/lz4.o node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CFLAGS = -Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
 else
-	CFLAGS?=-O3 -fstack-protector
-	CFLAGS+=$(ARCH_FLAGS) -Wall -flto -fPIE -fvectorize -pthread -mmacosx-version-min=10.7 -DNDEBUG -Wno-unused-private-field $(INCLUDES) $(DEFS)
+	CFLAGS?=-Ofast -fstack-protector
+	CFLAGS+=$(ARCH_FLAGS) -Wall -flto -fPIE -pthread -mmacosx-version-min=10.7 -DNDEBUG -Wno-unused-private-field $(INCLUDES) $(DEFS)
 	STRIP=strip
 endif
 
diff --git a/node/Packet.cpp b/node/Packet.cpp
index 2c73a087..f69e4e79 100644
--- a/node/Packet.cpp
+++ b/node/Packet.cpp
@@ -31,6 +31,8 @@ namespace ZeroTier {
 
 const unsigned char Packet::ZERO_KEY[32] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
 
+#ifdef ZT_TRACE
+
 const char *Packet::verbString(Verb v)
 	throw()
 {
@@ -52,6 +54,8 @@ const char *Packet::verbString(Verb v)
 		case VERB_MULTICAST_FRAME: return "MULTICAST_FRAME";
 		case VERB_SET_EPHEMERAL_KEY: return "SET_EPHEMERAL_KEY";
 		case VERB_PUSH_DIRECT_PATHS: return "PUSH_DIRECT_PATHS";
+		case VERB_CIRCUIT_TEST: return "CIRCUIT_TEST";
+		case VERB_CIRCUIT_TEST_REPORT: return "CIRCUIT_TEST_REPORT";
 	}
 	return "(unknown)";
 }
@@ -73,6 +77,8 @@ const char *Packet::errorString(ErrorCode e)
 	return "(unknown)";
 }
 
+#endif // ZT_TRACE
+
 void Packet::armor(const void *key,bool encryptPayload)
 {
 	unsigned char mangledKey[32];
diff --git a/node/Packet.hpp b/node/Packet.hpp
index 2a1a39af..71fa6e56 100644
--- a/node/Packet.hpp
+++ b/node/Packet.hpp
@@ -1105,19 +1105,12 @@ public:
 		ERROR_UNWANTED_MULTICAST = 8
 	};
 
-	/**
-	 * @param v Verb
-	 * @return String representation (e.g. HELLO, OK)
-	 */
+#ifdef ZT_TRACE
 	static const char *verbString(Verb v)
 		throw();
-
-	/**
-	 * @param e Error code
-	 * @return String error name
-	 */
 	static const char *errorString(ErrorCode e)
 		throw();
+#endif
 
 	template<unsigned int C2>
 	Packet(const Buffer<C2> &b) :
-- 
cgit v1.2.3