Skip to content

Commit 9c7cba6

Browse files
committed
backport leftover 1.12 changes
1 parent bdf38b5 commit 9c7cba6

File tree

7 files changed

+35
-8
lines changed

7 files changed

+35
-8
lines changed

CppParser/testsuite/src/CppParserTest.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,22 @@ void CppParserTest::testExtractName()
9494
name = Symbol::extractName(decl);
9595
assertTrue (name == "func");
9696

97+
decl = "std::function<bool> func";
98+
name = Symbol::extractName(decl);
99+
assertTrue (name == "func");
100+
101+
decl = "std::function<void(bool)> func";
102+
name = Symbol::extractName(decl);
103+
assertTrue (name == "func");
104+
105+
decl = "std::function<std::vector<int>(std::vector<bool>)> func";
106+
name = Symbol::extractName(decl);
107+
assertTrue (name == "func");
108+
109+
decl = "std::function<void*(std::function<const int*(void)>)> func";
110+
name = Symbol::extractName(decl);
111+
assertTrue (name == "func");
112+
97113
decl = "const std::vector<NS::MyType>* var";
98114
name = Symbol::extractName(decl);
99115
assertTrue (name == "var");

Data/src/SessionPool.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ void SessionPool::shutdown()
317317
if (_shutdown.exchange(true)) return;
318318
_shutdown = true;
319319
_janitorTimer.stop();
320+
321+
Poco::Mutex::ScopedLock lock(_mutex);
320322
closeAll(_idleSessions);
321323
closeAll(_activeSessions);
322324
}

Foundation/include/Poco/Logger.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ class Foundation_API Logger: public Channel
462462
~Logger();
463463

464464
void log(const std::string& text, Message::Priority prio);
465+
void logNPC(const std::string& text, Message::Priority prio);
465466
void log(const std::string& text, Message::Priority prio, const char* file, int line);
466467

467468
static std::string format(const std::string& fmt, int argc, std::string argv[]);
@@ -789,6 +790,15 @@ inline void Logger::log(const std::string& text, Message::Priority prio)
789790
}
790791

791792

793+
inline void Logger::logNPC(const std::string& text, Message::Priority prio)
794+
{
795+
if (_pChannel)
796+
{
797+
_pChannel->log(Message(_name, text, prio));
798+
}
799+
}
800+
801+
792802
inline void Logger::log(const std::string& text, Message::Priority prio, const char* file, int line)
793803
{
794804
if (_level >= prio && _pChannel)

Foundation/src/Thread_POSIX.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,12 @@ void ThreadImpl::setSignalMaskImpl(uint32_t sigMask)
262262
sigset_t sset;
263263
sigemptyset(&sset);
264264

265-
for (int sig = 0; sig < sizeof(uint32_t) * 8; ++sig)
265+
for (int sig = 0; sig < sizeof(uint32_t) * 8; ++sig)
266266
{
267267
if ((sigMask & (1 << sig)) != 0)
268268
sigaddset(&sset, sig);
269269
}
270-
270+
271271
pthread_sigmask(SIG_BLOCK, &sset, 0);
272272
}
273273

Net/include/Poco/Net/SocketReactor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Net_API SocketReactor: public Poco::Runnable
104104
/// Finally, when the SocketReactor is about to shut down (as a result
105105
/// of stop() being called), it dispatches a ShutdownNotification
106106
/// to all event handlers. This is done in the onShutdown() method
107-
/// which can be overridded by subclasses to perform custom
107+
/// which can be overridden by subclasses to perform custom
108108
/// shutdown processing.
109109
///
110110
/// The SocketReactor is implemented so that it can run in its own thread.

Net/src/HTTPDigestCredentials.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ void HTTPDigestCredentials::updateAuthParams(const HTTPRequest& request)
334334
ha1 = digest(engine, ha1, nonce, cnonce);
335335
}
336336

337-
const std::string ha2 = digest(engine, request.getMethod(), request.getURI());
338-
337+
const std::string ha2 = digest(engine, request.getMethod(), request.getURI());
338+
339339
_requestAuthParams.set(NC_PARAM, nc);
340340
_requestAuthParams.set(CNONCE_PARAM, cnonce);
341341
_requestAuthParams.set(RESPONSE_PARAM, digest(engine, ha1, nonce, nc, cnonce, qop, ha2));
@@ -367,7 +367,7 @@ bool HTTPDigestCredentials::verifyAuthParams(const HTTPRequest& request, const H
367367
else if (icompare(qop, AUTH_PARAM) == 0)
368368
{
369369
const std::string& algorithm = params.get(ALGORITHM_PARAM, MD_5_ALGORITHM);
370-
370+
371371
if (!isAlgorithmSupported(algorithm)) {
372372
throw NotImplementedException("Unsupported digest algorithm", algorithm);
373373
}
@@ -406,7 +406,7 @@ int HTTPDigestCredentials::updateNonceCounter(const std::string& nonce)
406406

407407
bool HTTPDigestCredentials::isAlgorithmSupported(const std::string& algorithm) const
408408
{
409-
bool isAlgorithmSupported = std::find_if(std::begin(SUPPORTED_ALGORITHMS),
409+
bool isAlgorithmSupported = std::find_if(std::begin(SUPPORTED_ALGORITHMS),
410410
std::end(SUPPORTED_ALGORITHMS),
411411
[&algorithm](const std::string& supportedAlgorithm)
412412
{

Net/testsuite/src/PollSetTest.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ void PollSetTest::testPollNoServer()
361361
catch (Poco::Exception&) {}
362362

363363
assertEqual(2, ps.poll(Timespan(1000000)).size());
364-
365364
}
366365

367366

0 commit comments

Comments
 (0)