pjproject/patches/config_site: Increase the max number of ICE candidates
[asterisk/asterisk.git] / third-party / pjproject / patches / 0001-evsub-Add-APIs-to-add-decrement-an-event-subscriptio.patch
1 From a5030c9b33b2c936879fbacb1d2ea5edc2979181 Mon Sep 17 00:00:00 2001
2 From: George Joseph <gjoseph@digium.com>
3 Date: Sat, 18 Jun 2016 10:14:34 -0600
4 Subject: [PATCH] evsub:  Add APIs to add/decrement an event  subscription's
5  group lock
6
7 These APIs can be used to ensure that the evsub isn't destroyed before
8 an application is finished using it.
9 ---
10  pjsip/include/pjsip-simple/evsub.h | 20 ++++++++++++++++++++
11  pjsip/src/pjsip-simple/evsub.c     | 14 ++++++++++++++
12  2 files changed, 34 insertions(+)
13
14 diff --git a/pjsip/include/pjsip-simple/evsub.h b/pjsip/include/pjsip-simple/evsub.h
15 index 2dc4d69..31f85f8 100644
16 --- a/pjsip/include/pjsip-simple/evsub.h
17 +++ b/pjsip/include/pjsip-simple/evsub.h
18 @@ -490,6 +490,26 @@ PJ_DECL(void) pjsip_evsub_set_mod_data( pjsip_evsub *sub, unsigned mod_id,
19  PJ_DECL(void*) pjsip_evsub_get_mod_data( pjsip_evsub *sub, unsigned mod_id );
20  
21  
22 +/**
23 + * Increment the event subscription's group lock.
24 + *
25 + * @param sub          The server subscription instance.
26 + *
27 + * @return             PJ_SUCCESS on success.
28 + */
29 +PJ_DEF(pj_status_t) pjsip_evsub_add_ref(pjsip_evsub *sub);
30 +
31 +
32 +/**
33 + * Decrement the event subscription's group lock.
34 + *
35 + * @param sub          The server subscription instance.
36 + *
37 + * @return             PJ_SUCCESS on success.
38 + */
39 +PJ_DEF(pj_status_t) pjsip_evsub_dec_ref(pjsip_evsub *sub);
40 +
41 +
42  
43  PJ_END_DECL
44  
45 diff --git a/pjsip/src/pjsip-simple/evsub.c b/pjsip/src/pjsip-simple/evsub.c
46 index 7cd8859..68a9564 100644
47 --- a/pjsip/src/pjsip-simple/evsub.c
48 +++ b/pjsip/src/pjsip-simple/evsub.c
49 @@ -831,7 +831,21 @@ static pj_status_t evsub_create( pjsip_dialog *dlg,
50      return PJ_SUCCESS;
51  }
52  
53 +/*
54 + * Increment the event subscription's group lock.
55 + */
56 +PJ_DEF(pj_status_t) pjsip_evsub_add_ref(pjsip_evsub *sub)
57 +{
58 +    return pj_grp_lock_add_ref(sub->grp_lock);
59 +}
60  
61 +/*
62 + * Decrement the event subscription's group lock.
63 + */
64 +PJ_DEF(pj_status_t) pjsip_evsub_dec_ref(pjsip_evsub *sub)
65 +{
66 +    return pj_grp_lock_dec_ref(sub->grp_lock);
67 +}
68  
69  /*
70   * Create client subscription session.
71 -- 
72 2.5.5
73