Browse Source

removed print functions from non "DEBUG"-build

Florian Palm 10 years ago
parent
commit
6d4eedc682
2 changed files with 4 additions and 1 deletions
  1. 2 1
      examples/src/opcuaServerACPLT.c
  2. 2 0
      src/ua_services_session.c

+ 2 - 1
examples/src/opcuaServerACPLT.c

@@ -134,6 +134,7 @@ void server_run() {
 				slMessage.length = n;
 				slMessage.length = n;
 #ifdef DEBUG
 #ifdef DEBUG
 				UA_ByteString_printx("server_run - received=",&slMessage);
 				UA_ByteString_printx("server_run - received=",&slMessage);
+#endif
 				TL_Process(connection, &slMessage);
 				TL_Process(connection, &slMessage);
 			} else if (n <= 0) {
 			} else if (n <= 0) {
 				perror("ERROR reading from socket1");
 				perror("ERROR reading from socket1");
@@ -150,5 +151,5 @@ void server_run() {
 	close(sockfd);
 	close(sockfd);
 }
 }
 
 
-#endif
+
 #endif
 #endif

+ 2 - 0
src/ua_services_session.c

@@ -34,10 +34,12 @@ UA_Int32 Service_ActivateSession(SL_Channel channel,UA_Session session,
 	UA_Session_bind(session, channel);
 	UA_Session_bind(session, channel);
 
 
 	UA_Session_setApplicationPointer(session, &appMockup);
 	UA_Session_setApplicationPointer(session, &appMockup);
+#ifdef DEBUG
 	UA_NodeId_printf("ActivateSession - authToken=", &(request->requestHeader.authenticationToken));
 	UA_NodeId_printf("ActivateSession - authToken=", &(request->requestHeader.authenticationToken));
 	// 321 == AnonymousIdentityToken_Encoding_DefaultBinary
 	// 321 == AnonymousIdentityToken_Encoding_DefaultBinary
 	UA_NodeId_printf("ActivateSession - uIdToken.type=", &(request->userIdentityToken.typeId));
 	UA_NodeId_printf("ActivateSession - uIdToken.type=", &(request->userIdentityToken.typeId));
 	UA_ByteString_printx_hex("ActivateSession - uIdToken.body=", &(request->userIdentityToken.body));
 	UA_ByteString_printx_hex("ActivateSession - uIdToken.body=", &(request->userIdentityToken.body));
+#endif
 	//TODO fill results
 	//TODO fill results
 	return UA_SUCCESS;
 	return UA_SUCCESS;
 }
 }