Asterisk - The Open Source Telephony Project GIT-master-f36a736
global_datastores.c
Go to the documentation of this file.
1/*
2 * Asterisk -- An open source telephony toolkit.
3 *
4 * Copyright (C) 1999 - 2007, Digium, Inc.
5 *
6 * Mark Michelson <mmichelson@digium.com>
7 *
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
13 *
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
17 */
18
19/*! \file
20 *
21 * \brief globally-accessible datastore information and callbacks
22 *
23 * \author Mark Michelson <mmichelson@digium.com>
24 */
25
26/*** MODULEINFO
27 <support_level>core</support_level>
28 ***/
29
30#include "asterisk.h"
31
33
34static void secure_call_store_destroy(void *data)
35{
36 struct ast_secure_call_store *store = data;
37
38 ast_free(store);
39}
40
41static void *secure_call_store_duplicate(void *data)
42{
43 struct ast_secure_call_store *old = data;
44 struct ast_secure_call_store *new;
45
46 if (!(new = ast_calloc(1, sizeof(*new)))) {
47 return NULL;
48 }
49 new->signaling = old->signaling;
50 new->media = old->media;
51
52 return new;
53}
55 .type = "encrypt-call",
57 .duplicate = secure_call_store_duplicate,
58};
Asterisk main include file. File version handling, generic pbx functions.
#define ast_free(a)
Definition: astmm.h:180
#define ast_calloc(num, len)
A wrapper for calloc()
Definition: astmm.h:202
static void secure_call_store_destroy(void *data)
static void * secure_call_store_duplicate(void *data)
const struct ast_datastore_info secure_call_info
globally accessible channel datastores
#define NULL
Definition: resample.c:96
Structure for a data store type.
Definition: datastore.h:31
const char * type
Definition: datastore.h:32