summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-08-05 16:56:11 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-08-05 16:56:11 +0000
commit7df8b8b848b1cd8c218698d0c03ff8d8481a7fcf (patch)
treed6b2d0850bac2afae7026e0560ca97c249f82d66 /channels
parent8ba981911a30f83be404a5e68d5136d0bf8b2cc2 (diff)
make datastore creation and destruction a generic API since it is not really channel related, and add the ability to add/find/remove datastores to manager sessions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_iax2.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 6722818ce..34f4843de 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -6474,7 +6474,7 @@ static int authenticate_reply(struct chan_iax2_pvt *p, struct sockaddr_in *sin,
struct ast_variable *var, *prev = NULL;
AST_LIST_HEAD(, ast_var_t) *varlist;
varlist = ast_calloc(1, sizeof(*varlist));
- variablestore = ast_channel_datastore_alloc(&iax2_variable_datastore_info, NULL);
+ variablestore = ast_datastore_alloc(&iax2_variable_datastore_info, NULL);
if (variablestore && varlist && p->owner) {
variablestore->data = varlist;
variablestore->inheritance = DATASTORE_INHERIT_FOREVER;
@@ -6499,7 +6499,7 @@ static int authenticate_reply(struct chan_iax2_pvt *p, struct sockaddr_in *sin,
if (p->owner)
ast_log(LOG_ERROR, "Memory allocation error while processing IAX2 variables\n");
if (variablestore)
- ast_channel_datastore_free(variablestore);
+ ast_datastore_free(variablestore);
if (varlist)
ast_free(varlist);
}
@@ -7967,7 +7967,7 @@ static int acf_iaxvar_write(struct ast_channel *chan, const char *cmd, char *dat
struct ast_var_t *var;
if (!variablestore) {
- variablestore = ast_channel_datastore_alloc(&iax2_variable_datastore_info, NULL);
+ variablestore = ast_datastore_alloc(&iax2_variable_datastore_info, NULL);
if (!variablestore) {
ast_log(LOG_ERROR, "Memory allocation error\n");
return -1;
@@ -8362,7 +8362,7 @@ static int socket_process(struct iax2_thread *thread)
struct ast_variable *var, *prev = NULL;
AST_LIST_HEAD(, ast_var_t) *varlist;
varlist = ast_calloc(1, sizeof(*varlist));
- variablestore = ast_channel_datastore_alloc(&iax2_variable_datastore_info, NULL);
+ variablestore = ast_datastore_alloc(&iax2_variable_datastore_info, NULL);
if (variablestore && varlist) {
variablestore->data = varlist;
variablestore->inheritance = DATASTORE_INHERIT_FOREVER;
@@ -8386,7 +8386,7 @@ static int socket_process(struct iax2_thread *thread)
} else {
ast_log(LOG_ERROR, "Memory allocation error while processing IAX2 variables\n");
if (variablestore)
- ast_channel_datastore_free(variablestore);
+ ast_datastore_free(variablestore);
if (varlist)
ast_free(varlist);
}
@@ -9139,7 +9139,7 @@ retryowner2:
struct ast_variable *var, *prev = NULL;
AST_LIST_HEAD(, ast_var_t) *varlist;
varlist = ast_calloc(1, sizeof(*varlist));
- variablestore = ast_channel_datastore_alloc(&iax2_variable_datastore_info, NULL);
+ variablestore = ast_datastore_alloc(&iax2_variable_datastore_info, NULL);
if (variablestore && varlist) {
variablestore->data = varlist;
variablestore->inheritance = DATASTORE_INHERIT_FOREVER;
@@ -9163,7 +9163,7 @@ retryowner2:
} else {
ast_log(LOG_ERROR, "Memory allocation error while processing IAX2 variables\n");
if (variablestore)
- ast_channel_datastore_free(variablestore);
+ ast_datastore_free(variablestore);
if (varlist)
ast_free(varlist);
}
@@ -9203,7 +9203,7 @@ retryowner2:
struct ast_variable *var, *prev = NULL;
AST_LIST_HEAD(, ast_var_t) *varlist;
varlist = ast_calloc(1, sizeof(*varlist));
- variablestore = ast_channel_datastore_alloc(&iax2_variable_datastore_info, NULL);
+ variablestore = ast_datastore_alloc(&iax2_variable_datastore_info, NULL);
if (variablestore && varlist) {
variablestore->data = varlist;
variablestore->inheritance = DATASTORE_INHERIT_FOREVER;
@@ -9227,7 +9227,7 @@ retryowner2:
} else {
ast_log(LOG_ERROR, "Memory allocation error while processing IAX2 variables\n");
if (variablestore)
- ast_channel_datastore_free(variablestore);
+ ast_datastore_free(variablestore);
if (varlist)
ast_free(varlist);
}