summaryrefslogtreecommitdiff
path: root/main/db.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2007-01-05 23:32:42 +0000
committerKevin P. Fleming <kpfleming@digium.com>2007-01-05 23:32:42 +0000
commitcd73a483f15033a2c619e7551d8014638e05db4f (patch)
tree76ff7f6c897bdfda963986fdaacae6e6ffc39542 /main/db.c
parent7cb197a5b723eaf131a3534436a451669105dd8a (diff)
const-ify some more APIs, and fix rev 49710 from branch-1.4 in a better way here
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/db.c')
-rw-r--r--main/db.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/db.c b/main/db.c
index 84fe2cd0a..e51b9268c 100644
--- a/main/db.c
+++ b/main/db.c
@@ -142,7 +142,7 @@ int ast_db_deltree(const char *family, const char *keytree)
return 0;
}
-int ast_db_put(const char *family, const char *keys, char *value)
+int ast_db_put(const char *family, const char *keys, const char *value)
{
char fullkey[256];
DBT key, data;
@@ -159,7 +159,7 @@ int ast_db_put(const char *family, const char *keys, char *value)
memset(&data, 0, sizeof(data));
key.data = fullkey;
key.size = fullkeylen + 1;
- data.data = value;
+ data.data = (char *) value;
data.size = strlen(value) + 1;
res = astdb->put(astdb, &key, &data, 0);
astdb->sync(astdb, 0);
@@ -542,7 +542,7 @@ static int manager_dbput(struct mansession *s, const struct message *m)
return 0;
}
- res = ast_db_put(family, key, (char *) val);
+ res = ast_db_put(family, key, val);
if (res) {
astman_send_error(s, m, "Failed to update entry");
} else {