4
* TLS module - common functions
6
* Copyright (C) 2001-2003 FhG FOKUS
7
* Copyright (C) 2004,2005 Free Software Foundation, Inc.
8
4
* Copyright (C) 2005 iptelorg GmbH
10
* This file is part of SIP-router, a free SIP server.
12
* SIP-router is free software; you can redistribute it and/or modify
13
* it under the terms of the GNU General Public License as published by
14
* the Free Software Foundation; either version 2 of the License, or
15
* (at your option) any later version
17
* SIP-router is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
22
* You should have received a copy of the GNU General Public License
23
* along with this program; if not, write to the Free Software
24
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
5
* Copyright (C) 2013 Motorola Solutions, Inc.
7
* Permission to use, copy, modify, and distribute this software for any
8
* purpose with or without fee is hereby granted, provided that the above
9
* copyright notice and this permission notice appear in all copies.
11
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
27
21
#define _GNU_SOURCE 1 /* Needed for strndup */
29
23
#include <string.h>
30
24
#include <libgen.h>
31
25
#include "../../mem/shm_mem.h"
32
26
#include "../../globals.h"
27
#include "../../dprint.h"
33
28
#include "tls_mod.h"
34
29
#include "tls_util.h"
87
82
cur = (*tls_domains_cfg)->next;
90
86
if (cur->ref_count == 0) {
91
/* Not referenced by any existing connection */
87
/* Not referenced by any existing connection */
92
88
prev->next = cur->next;
91
/* Only update prev if we didn't remove cur */
100
97
lock_release(tls_domains_cfg_lock);