It conflicted with nested calls to a module. Such calls usually don't
happen, but could be triggered using alias module.
In this case m_pClient became NULL while executing the alias, and the
rest of that alias caused segfault.
Fix#1347
If OpenSSL 1.1 is configured in such a way that features deprecated in 0.9.8 are not built, then compile errors would result here.
I also noticed a potential memory leak where pRSA was not always freed before early return from this function - fixed by using C++11 unique_ptr.
Users who upgrade from <=1.4 to 1.6.0 and have configured 0 for channel buffer, were silently not getting any queries while disconnected anymore.
Thanks to jpnurmi for the idea how to bandaid this in 1.6.x branch.
Proper fix will go to 1.7 and will take form of separate settings for channel and query buffers.
See #967
Noone remembers these days that at some point ZNC supported using the
same config directory, but different znc.conf. So now the old message is
just confusing.
However, nowadays many people confuse "/znc foo" in IRC client with
"znc foo" in shell.
These functions shouldn't be visible outside of this file. This was caught by
-Werror=missing-declarations.
Signed-off-by: Uli Schlachter <psychon@znc.in>
From pthread_cond_wait()'s man page:
When using condition variables there is always a boolean predicate involving
shared variables associated with each condition wait that is true if the
thread should proceed. Spurious wakeups from the pthread_cond_wait() or
pthread_cond_timedwait() functions may occur. Since the return from
pthread_cond_wait() or pthread_cond_timedwait() does not imply anything about
the value of this predicate, the predicate should be re-evaluated upon such
return.
Fix ~CThreadPool() to account for this possibility.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In versions prior to 1.0, ZNC did not allow multiple networks per user. The string telling users to connect has never been changed after ZNC 1.0, and this fixes just that.
The old internal storage format was:
::__:SAVEBUFF:__::<buffer lines>
The new storage format for channels:
::__:CHANBUFF:__::<buffer name>
<buffer lines>
The new storage format for queries:
::__:QUERYBUFF:__::<buffer name>
<buffer lines>
See #802 for details why the storage format had to be changed. Reading
the old storage format is still supported so old saved buffers load as
appropriate.