summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Clapies <nclapies@entrouvert.com>2004-06-11 14:10:36 +0000
committerNicolas Clapies <nclapies@entrouvert.com>2004-06-11 14:10:36 +0000
commit22cc71048634cf06820ffe7a3d367cd9ef69f207 (patch)
tree3e1d2bc86bb27442116dd72da54703ed692fa4a7
parent0772620687676bd3fd35c87f7d77b52ac3a66606 (diff)
downloadlasso-22cc71048634cf06820ffe7a3d367cd9ef69f207.tar.gz
lasso-22cc71048634cf06820ffe7a3d367cd9ef69f207.tar.xz
lasso-22cc71048634cf06820ffe7a3d367cd9ef69f207.zip
fix : strange conversion of true string to an integer value setting the wrong value to the function settings of IsPassive and ForceAuthn
-rw-r--r--lasso/Attic/protocols/authn_request.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/lasso/Attic/protocols/authn_request.c b/lasso/Attic/protocols/authn_request.c
index 87884354..dbd9c9a8 100644
--- a/lasso/Attic/protocols/authn_request.c
+++ b/lasso/Attic/protocols/authn_request.c
@@ -251,13 +251,22 @@ lasso_authn_request_new_from_query(gchar *query)
/* ForceAuthn */
str = lasso_g_ptr_array_index((GPtrArray *)g_datalist_get_data(&gd, "ForceAuthn"), 0);
- if (str != NULL)
- lasso_lib_authn_request_set_forceAuthn(LASSO_LIB_AUTHN_REQUEST(request), atoi(str));
+ printf("%s\n", str);
+ if (str != NULL){
+ if(!strcmp(str, "true"))
+ lasso_lib_authn_request_set_forceAuthn(LASSO_LIB_AUTHN_REQUEST(request), TRUE);
+ else if(!strcmp(str, "false"))
+ lasso_lib_authn_request_set_forceAuthn(LASSO_LIB_AUTHN_REQUEST(request), FALSE);
+ }
/* IsPassive */
str = lasso_g_ptr_array_index((GPtrArray *)g_datalist_get_data(&gd, "IsPassive"), 0);
- if (str != NULL)
- lasso_lib_authn_request_set_isPassive(LASSO_LIB_AUTHN_REQUEST(request), atoi(str));
+ if (str != NULL){
+ if(!strcmp(str, "true"))
+ lasso_lib_authn_request_set_isPassive(LASSO_LIB_AUTHN_REQUEST(request), TRUE);
+ else
+ lasso_lib_authn_request_set_isPassive(LASSO_LIB_AUTHN_REQUEST(request), FALSE);
+ }
/* ProtocolProfile */
str = lasso_g_ptr_array_index((GPtrArray *)g_datalist_get_data(&gd, "ProtocolProfile"), 0);