--- /dev/null
+--- bzrtp-5.2.51/include/bzrtp/bzrtp.h.orig 2023-02-22 10:01:18.000000000 +0100
++++ bzrtp-5.2.51/include/bzrtp/bzrtp.h 2023-04-18 21:56:42.215384029 +0200
+@@ -272,6 +272,8 @@ BZRTP_EXPORT bzrtpContext_t *bzrtp_creat
+ */
+ BZRTP_EXPORT int bzrtp_initBzrtpContext(bzrtpContext_t *context, uint32_t selfSSRC);
+
++BZRTP_EXPORT void bzrtp_resetBzrtpContext(bzrtpContext_t *context);
++
+ /**
+ * Free memory of context structure to a channel, if all channels are freed, free the global zrtp context
+ * @param[in] context Context hosting the channel to be destroyed.(note: the context zrtp context itself is destroyed with the last channel)
+--- bzrtp-5.2.51/src/bzrtp.c.orig 2023-02-22 10:01:18.000000000 +0100
++++ bzrtp-5.2.51/src/bzrtp.c 2023-04-18 21:59:34.831115556 +0200
+@@ -181,6 +181,17 @@ int bzrtp_setZIDCache_lock(bzrtpContext_
+ #endif /* ZIDCACHE_ENABLED */
+ }
+
++void bzrtp_resetBzrtpContext(bzrtpContext_t *context) {
++ int i;
++ for (i=0; i<ZRTP_MAX_CHANNEL_NUMBER; i++) {
++ if (context->channelContext[i]) {
++ void * clientData = context->channelContext[i]->clientData;
++ bzrtp_initChannelContext(context, context->channelContext[i], context->channelContext[i]->selfSSRC, context->channelContext[i]->isMainChannel);
++ context->channelContext[i]->clientData = clientData;
++ }
++ }
++}
++
+ /**
+ * @brief Perform some initialisation which can't be done without some callback functions:
+ * This function is called once per session when the first channel is created.
Summary: Open source implementation of ZRTP keys exchange protocol
Summary(pl.UTF-8): Mająca otwarte źródła implementacja protokołu wymiany kluczy ZRTP
Name: bzrtp
-Version: 5.2.49
+Version: 5.2.51
Release: 1
License: GPL v3+
Group: Libraries
#Source0Download: https://gitlab.linphone.org/BC/public/bzrtp/tags
Source0: https://gitlab.linphone.org/BC/public/bzrtp/-/archive/%{version}/%{name}-%{version}.tar.bz2
-# Source0-md5: 30ed3cd6347609129eb71a3b7246eee0
+# Source0-md5: 6b6957011c7f82a37af2407645a204e5
Patch0: %{name}-static.patch
+Patch1: %{name}-resetBzrtpContext.patch
URL: http://www.linphone.org/
BuildRequires: CUnit
BuildRequires: bctoolbox-devel >= 4.4.0
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
install -d builddir