Changeset 2894 for pjproject/trunk/pjsip/src/pjsip-ua/sip_replaces.c
- Timestamp:
- Aug 17, 2009 3:59:21 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip-ua/sip_replaces.c
r2394 r2894 28 28 #include <pjsip/sip_util.h> 29 29 #include <pj/assert.h> 30 #include <pj/log.h> 30 31 #include <pj/pool.h> 31 32 #include <pj/string.h> 33 34 #define THIS_FILE "sip_replaces.c" 32 35 33 36 … … 51 54 /* Globals */ 52 55 static pjsip_endpoint *the_endpt; 56 static pj_bool_t is_initialized; 53 57 54 58 PJ_DEF(pjsip_replaces_hdr*) pjsip_replaces_hdr_create(pj_pool_t *pool) … … 157 161 } 158 162 163 164 /* Deinitialize Replaces */ 165 static void pjsip_replaces_deinit_module(void) 166 { 167 is_initialized = PJ_FALSE; 168 } 169 159 170 /* 160 171 * Initialize Replaces support in PJSIP. … … 164 175 pj_status_t status; 165 176 const pj_str_t STR_REPLACES = { "replaces", 8 }; 166 static pj_bool_t is_initialized;167 177 168 178 the_endpt = endpt; … … 180 190 status = pjsip_endpt_add_capability(endpt, NULL, PJSIP_H_SUPPORTED, NULL, 181 191 1, &STR_REPLACES); 192 193 /* Register deinit module to be executed when PJLIB shutdown */ 194 if (pj_atexit(&pjsip_replaces_deinit_module) != PJ_SUCCESS) { 195 /* Failure to register this function may cause this module won't 196 * work properly when the stack is restarted (without quitting 197 * application). 198 */ 199 pj_assert(!"Failed to register Replaces deinit."); 200 PJ_LOG(1, (THIS_FILE, "Failed to register Replaces deinit.")); 201 } 182 202 183 203 is_initialized = PJ_TRUE;
Note: See TracChangeset
for help on using the changeset viewer.