mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 20:08:17 +00:00
Get the printf of the value returned length out
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
2
db.c
2
db.c
@@ -160,7 +160,9 @@ int ast_db_get(const char *family, const char *keys, char *value, int valuelen)
|
|||||||
value[0] = 0;
|
value[0] = 0;
|
||||||
ast_log(LOG_DEBUG, "Unable to find key '%s' in family '%s'\n", keys, family);
|
ast_log(LOG_DEBUG, "Unable to find key '%s' in family '%s'\n", keys, family);
|
||||||
} else {
|
} else {
|
||||||
|
#if 0
|
||||||
printf("Got value of size %d\n", data.size);
|
printf("Got value of size %d\n", data.size);
|
||||||
|
#endif
|
||||||
if (data.size) {
|
if (data.size) {
|
||||||
((char *)data.data)[data.size - 1] = '\0';
|
((char *)data.data)[data.size - 1] = '\0';
|
||||||
strncpy(value, data.data, valuelen - 1);
|
strncpy(value, data.data, valuelen - 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user