mirror of
				https://github.com/pocoproject/poco.git
				synced 2025-11-03 19:40:37 +01:00 
			
		
		
		
	fix incorrect auto_ptr usage in testsuite
This commit is contained in:
		@@ -25,6 +25,7 @@
 | 
				
			|||||||
#include "Poco/Net/ServerSocket.h"
 | 
					#include "Poco/Net/ServerSocket.h"
 | 
				
			||||||
#include "Poco/Net/NetException.h"
 | 
					#include "Poco/Net/NetException.h"
 | 
				
			||||||
#include "Poco/Thread.h"
 | 
					#include "Poco/Thread.h"
 | 
				
			||||||
 | 
					#include "Poco/Buffer.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using Poco::Net::HTTPClientSession;
 | 
					using Poco::Net::HTTPClientSession;
 | 
				
			||||||
@@ -51,13 +52,13 @@ namespace
 | 
				
			|||||||
			try
 | 
								try
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				WebSocket ws(request, response);
 | 
									WebSocket ws(request, response);
 | 
				
			||||||
				std::auto_ptr<char> pBuffer(new char[_bufSize]);
 | 
									Poco::Buffer<char> buffer(_bufSize);
 | 
				
			||||||
				int flags;
 | 
									int flags;
 | 
				
			||||||
				int n;
 | 
									int n;
 | 
				
			||||||
				do
 | 
									do
 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					n = ws.receiveFrame(pBuffer.get(), _bufSize, flags);
 | 
										n = ws.receiveFrame(buffer.begin(), buffer.size(), flags);
 | 
				
			||||||
					ws.sendFrame(pBuffer.get(), n, flags);
 | 
										ws.sendFrame(buffer.begin(), n, flags);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				while (n > 0 || (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE);
 | 
									while (n > 0 || (flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user