]> git.pld-linux.org Git - packages/bzrtp.git/blob - bzrtp-resetBzrtpContext.patch
- updated to 5.3.26
[packages/bzrtp.git] / bzrtp-resetBzrtpContext.patch
1 --- bzrtp-5.2.51/include/bzrtp/bzrtp.h.orig     2023-02-22 10:01:18.000000000 +0100
2 +++ bzrtp-5.2.51/include/bzrtp/bzrtp.h  2023-04-18 21:56:42.215384029 +0200
3 @@ -272,6 +272,8 @@ BZRTP_EXPORT bzrtpContext_t *bzrtp_creat
4   */
5  BZRTP_EXPORT int bzrtp_initBzrtpContext(bzrtpContext_t *context, uint32_t selfSSRC);
6  
7 +BZRTP_EXPORT void bzrtp_resetBzrtpContext(bzrtpContext_t *context);
8 +
9  /**
10   * Free memory of context structure to a channel, if all channels are freed, free the global zrtp context
11   * @param[in]  context         Context hosting the channel to be destroyed.(note: the context zrtp context itself is destroyed with the last channel)
12 --- bzrtp-5.2.51/src/bzrtp.c.orig       2023-02-22 10:01:18.000000000 +0100
13 +++ bzrtp-5.2.51/src/bzrtp.c    2023-04-18 21:59:34.831115556 +0200
14 @@ -181,6 +181,17 @@ int bzrtp_setZIDCache_lock(bzrtpContext_
15  #endif /* ZIDCACHE_ENABLED */
16  }
17  
18 +void bzrtp_resetBzrtpContext(bzrtpContext_t *context) {
19 +       int i;
20 +       for (i=0; i<ZRTP_MAX_CHANNEL_NUMBER; i++) {
21 +               if (context->channelContext[i]) {
22 +                       void * clientData = context->channelContext[i]->clientData;
23 +                       bzrtp_initChannelContext(context, context->channelContext[i], context->channelContext[i]->selfSSRC, context->channelContext[i]->isMainChannel);
24 +                       context->channelContext[i]->clientData = clientData;
25 +               }
26 +       }
27 +}
28 +
29  /**
30   * @brief Perform some initialisation which can't be done without some callback functions:
31   *  This function is called once per session when the first channel is created.
This page took 0.507697 seconds and 3 git commands to generate.