[asterisk-commits] eliel: branch eliel/data_api_providers_gsoc2010 r273874 - /team/eliel/data_ap...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Jul 3 17:48:11 CDT 2010
Author: eliel
Date: Sat Jul 3 17:48:08 2010
New Revision: 273874
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=273874
Log:
Use the same container for passwords and strings.
Modified:
team/eliel/data_api_providers_gsoc2010/main/data.c
Modified: team/eliel/data_api_providers_gsoc2010/main/data.c
URL: http://svnview.digium.com/svn/asterisk/team/eliel/data_api_providers_gsoc2010/main/data.c?view=diff&rev=273874&r1=273873&r2=273874
==============================================================================
--- team/eliel/data_api_providers_gsoc2010/main/data.c (original)
+++ team/eliel/data_api_providers_gsoc2010/main/data.c Sat Jul 3 17:48:08 2010
@@ -88,7 +88,6 @@
double dbl;
unsigned int boolean;
char *str;
- char *password;
char character;
struct in_addr ipaddr;
void *ptr;
@@ -1363,9 +1362,6 @@
switch (root->type) {
case AST_DATA_PASSWORD:
- ast_free(root->payload.password);
- ao2_ref(root->children, -1);
- break;
case AST_DATA_STRING:
ast_free(root->payload.str);
ao2_ref(root->children, -1);
@@ -1467,9 +1463,6 @@
switch (d_child->type) {
case AST_DATA_PASSWORD:
- notmatch = data_search_cmp_string(s_child, d_child->name,
- d_child->payload.password);
- break;
case AST_DATA_STRING:
notmatch = data_search_cmp_string(s_child, d_child->name,
d_child->payload.str);
@@ -2093,7 +2086,7 @@
data_get_xml_add_child(node, child_xml);
break;
case AST_DATA_PASSWORD:
- ast_xml_set_text(child_xml, node->payload.password);
+ ast_xml_set_text(child_xml, node->payload.str);
break;
case AST_DATA_STRING:
ast_xml_set_text(child_xml, node->payload.str);
@@ -2243,8 +2236,6 @@
node->payload.dbl = *(double *) ptr;
break;
case AST_DATA_PASSWORD:
- node->payload.password = (char *) ptr;
- break;
case AST_DATA_STRING:
node->payload.str = (char *) ptr;
break;
@@ -2548,7 +2539,7 @@
content->value.AST_DATA_STRING = node->payload.str;
break;
case AST_DATA_PASSWORD:
- content->value.AST_DATA_PASSWORD = node->payload.password;
+ content->value.AST_DATA_PASSWORD = node->payload.str;
break;
case AST_DATA_CHARACTER:
content->value.AST_DATA_CHARACTER = node->payload.character;
@@ -2655,7 +2646,7 @@
ast_str_append(&output, 0, "%s%s: \"%s\"\n",
ast_str_buffer(tabs),
node->name,
- node->payload.password);
+ node->payload.str);
break;
case AST_DATA_STRING:
ast_str_append(&output, 0, "%s%s: \"%s\"\n",
@@ -2940,7 +2931,7 @@
astman_append(s, ": %u\r\n", node->payload.uint);
break;
case AST_DATA_PASSWORD:
- astman_append(s, ": %s\r\n", node->payload.password);
+ astman_append(s, ": %s\r\n", node->payload.str);
break;
case AST_DATA_STRING:
astman_append(s, ": %s\r\n", node->payload.str);
More information about the asterisk-commits
mailing list