summaryrefslogtreecommitdiffstats
path: root/database
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2009-09-25 23:26:16 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2009-09-25 23:26:16 +0200
commit4bc3e2523774ab9f6dfea7a00f683aba49b6424b (patch)
treefdc5d1139818bebc0e8d4fc8735eca21af3abd1e /database
parent73750bb6a385c6c1e87dc71b18caa32b31fb0029 (diff)
downloadeurephia-4bc3e2523774ab9f6dfea7a00f683aba49b6424b.tar.gz
eurephia-4bc3e2523774ab9f6dfea7a00f683aba49b6424b.tar.xz
eurephia-4bc3e2523774ab9f6dfea7a00f683aba49b6424b.zip
Renamed some variables to have a more meaningful name
Diffstat (limited to 'database')
-rw-r--r--database/sqlite/administration/useraccount.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/database/sqlite/administration/useraccount.c b/database/sqlite/administration/useraccount.c
index 68b5e8b..c2e84e2 100644
--- a/database/sqlite/administration/useraccount.c
+++ b/database/sqlite/administration/useraccount.c
@@ -387,19 +387,20 @@ static xmlDoc *useracc_add(eurephiaCTX *ctx, eDBfieldMap *usrinf_map) {
res_d = eurephiaXML_ResultMsg(ctx, exmlERROR, NULL,
"Failed to register the user account");
} else {
- xmlChar *certid = malloc_nullsafe(ctx, 34);
+ xmlChar *uid = malloc_nullsafe(ctx, 34);
xmlNode *info_n = NULL;
- assert( certid != NULL );
+ assert( uid != NULL );
- // Prepare an information tag/node with the certid value
- xmlStrPrintf(certid, 32, (xmlChar *) "%ld", res->last_insert_id);
+ // Prepare an information tag/node with the new uid value
+ xmlStrPrintf(uid, 32, (xmlChar *) "%ld", res->last_insert_id);
info_n = xmlNewNode(NULL, (xmlChar *)"UserAccount");
xmlNewProp(info_n, (xmlChar *) "mode", (xmlChar *) "add");
- xmlNewProp(info_n, (xmlChar *) "uid", certid);
+ xmlNewProp(info_n, (xmlChar *) "uid", uid);
eurephia_log(ctx, LOG_INFO, 0, "New user account created (uid %i)", res->last_insert_id);
res_d = eurephiaXML_ResultMsg(ctx, exmlRESULT, info_n,
"New user account created with uid %i", res->last_insert_id);
+ free_nullsafe(ctx, uid);
xmlFreeNode(info_n);
}
sqlite_free_results(res);
@@ -512,6 +513,7 @@ xmlDoc *eDBadminUserAccount(eurephiaCTX *ctx, xmlDoc *qryxml) {
eDBfieldMap *fmap_m = NULL;
char *mode = NULL;
int uid;
+
DEBUG(ctx, 20, "Function call: eDBadminUserAccount(ctx, xmlDoc)");
assert( (ctx != NULL) && (qryxml != NULL) );