summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2012-07-18 17:18:20 +0000
committerKevin P. Fleming <kpfleming@digium.com>2012-07-18 17:18:20 +0000
commit79087cbbd515a108188b93cf732e5baa1b4f28d0 (patch)
tree127ee795efcf82c1d6604ec510ddca5e00fb99c8 /main
parent8401e813833a6ef09073325409cd65b6840943b3 (diff)
Ensure that all ast_datastore_info structures are 'const'.
While addressing a bug, I came across a instance of 'struct ast_datastore_info' that was not declared 'const'. Since the API already expects them to be 'const', this patch changes the declarations of all existing instances that were not already declared that way. ........ Merged revisions 370183 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370184 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/ccss.c4
-rw-r--r--main/channel.c12
-rw-r--r--main/pbx.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/main/ccss.c b/main/ccss.c
index 03c75d750..76b02dac6 100644
--- a/main/ccss.c
+++ b/main/ccss.c
@@ -1845,7 +1845,7 @@ static void *dialed_cc_interfaces_duplicate(void *data)
* more information regarding the actual structure of the tree, see
* the documentation provided in include/asterisk/ccss.h
*/
-static const struct ast_datastore_info dialed_cc_interfaces_info = {
+static const const struct ast_datastore_info dialed_cc_interfaces_info = {
.type = "Dial CC Interfaces",
.duplicate = dialed_cc_interfaces_duplicate,
.destroy = dialed_cc_interfaces_destroy,
@@ -3285,7 +3285,7 @@ static void cc_recall_ds_destroy(void *data)
ast_free(recall_data);
}
-static struct ast_datastore_info recall_ds_info = {
+static const struct ast_datastore_info recall_ds_info = {
.type = "cc_recall",
.duplicate = cc_recall_ds_duplicate,
.destroy = cc_recall_ds_destroy,
diff --git a/main/channel.c b/main/channel.c
index 9abd9e7e0..1cfb76702 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -473,7 +473,7 @@ static void ast_chan_trace_destroy_cb(void *data)
}
/*! \brief Datastore to put the linked list of ast_chan_trace and trace status */
-static const struct ast_datastore_info ast_chan_trace_datastore_info = {
+static const const struct ast_datastore_info ast_chan_trace_datastore_info = {
.type = "ChanTrace",
.destroy = ast_chan_trace_destroy_cb
};
@@ -2377,7 +2377,7 @@ static void ast_dummy_channel_destructor(void *obj)
ast_channel_internal_cleanup(chan);
}
-struct ast_datastore *ast_channel_datastore_alloc(const struct ast_datastore_info *info, const char *uid)
+struct ast_datastore *ast_channel_datastore_alloc(const const struct ast_datastore_info *info, const char *uid)
{
return ast_datastore_alloc(info, uid);
}
@@ -2418,7 +2418,7 @@ int ast_channel_datastore_remove(struct ast_channel *chan, struct ast_datastore
return AST_LIST_REMOVE(ast_channel_datastores(chan), datastore, entry) ? 0 : -1;
}
-struct ast_datastore *ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, const char *uid)
+struct ast_datastore *ast_channel_datastore_find(struct ast_channel *chan, const const struct ast_datastore_info *info, const char *uid)
{
struct ast_datastore *datastore = NULL;
@@ -4700,7 +4700,7 @@ static void plc_ds_destroy(void *data)
ast_free(plc);
}
-static struct ast_datastore_info plc_ds_info = {
+static const struct ast_datastore_info plc_ds_info = {
.type = "plc",
.destroy = plc_ds_destroy,
};
@@ -6247,7 +6247,7 @@ static void xfer_ds_destroy(void *data)
ast_free(ds);
}
-static const struct ast_datastore_info xfer_ds_info = {
+static const const struct ast_datastore_info xfer_ds_info = {
.type = "xfer_colp",
.destroy = xfer_ds_destroy,
};
@@ -10021,7 +10021,7 @@ static void channel_cc_params_destroy(void *data)
ast_cc_config_params_destroy(cc_params);
}
-static const struct ast_datastore_info cc_channel_datastore_info = {
+static const const struct ast_datastore_info cc_channel_datastore_info = {
.type = "Call Completion",
.duplicate = channel_cc_params_copy,
.destroy = channel_cc_params_destroy,
diff --git a/main/pbx.c b/main/pbx.c
index cbfbafa69..a1ed1b52d 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -3437,7 +3437,7 @@ static void exception_store_free(void *data)
ast_free(exception);
}
-static struct ast_datastore_info exception_store_info = {
+static const struct ast_datastore_info exception_store_info = {
.type = "EXCEPTION",
.destroy = exception_store_free,
};