Browse Source

merging pains

Julius Pfrommer 11 years ago
parent
commit
407b4240fe
2 changed files with 2 additions and 3 deletions
  1. 0 3
      examples/src/opcuaServerACPLT.c
  2. 2 0
      src/ua_transport_binary.c

+ 0 - 3
examples/src/opcuaServerACPLT.c

@@ -49,7 +49,6 @@ Server server;
 UA_Int32 server_writer(TL_Connection* connection, UA_ByteString** gather_buf, UA_UInt32 gather_len) {
 	UA_UInt32 total_len = 0;
 	for(UA_UInt32 i=0;i<gather_len;i++) {
-	fflush(stdout);
 		total_len += gather_buf[i]->length;
 	}
     UA_ByteString msg;
@@ -60,8 +59,6 @@ UA_Int32 server_writer(TL_Connection* connection, UA_ByteString** gather_buf, UA
 		memcpy(msg.data+pos, gather_buf[i]->data, gather_buf[i]->length);
 		pos += gather_buf[i]->length;
 	}
-	UA_ByteString_printf("new msg: ", &msg);
-	fflush(stdout);
 	server.writeData.data = msg.data;
 	server.writeData.length = msg.length;
 	server.newDataToWrite = 1;

+ 2 - 0
src/ua_transport_binary.c

@@ -84,6 +84,8 @@ static UA_Int32 TL_handleMsg(TL_Connection* connection, const UA_ByteString* msg
 static UA_Int32 TL_handleClo(TL_Connection* connection, const UA_ByteString* msg, UA_Int32* pos) {
 	SL_Channel* slc = connection->secureChannel;
 	connection->connectionState = CONNECTIONSTATE_CLOSE;
+    connection->secureChannel = UA_NULL;
+    slc->tlConnection = UA_NULL;
 	return UA_SUCCESS;
 }