summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eurephiadm/commands/usercerts.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/eurephiadm/commands/usercerts.c b/eurephiadm/commands/usercerts.c
index 60590be..6fce7b1 100644
--- a/eurephiadm/commands/usercerts.c
+++ b/eurephiadm/commands/usercerts.c
@@ -454,16 +454,16 @@ int set_fwprofile(eurephiaCTX *ctx, eurephiaSESSION *sess, eurephiaVALUES *cfg,
fprintf(stderr, "%s: Failed to update firewall access profile for user-cert link\n", MODULE);
rc = 1;
goto exit;
- }
-
- res_n = eurephiaXML_getRoot(ctx, res_xml, NULL, 1);
- if( xmlStrcmp(res_n->name, (xmlChar *) "Error") == 0 ) {
- fprintf(stderr, "%s: %s\n", MODULE, xmlExtractContent(res_n));
- rc = 1;
} else {
- fprintf(stdout, "%s: %s\n", MODULE, xmlExtractContent(res_n));
- rc = 0;
- }
+ eurephiaRESULT *res = eurephiaXML_ParseResultMsg(ctx, res_xml);
+ if( res->resultType == exmlERROR ) {
+ fprintf(stderr, "%s: %s\n", MODULE, res->message);
+ rc = 1;
+ } else {
+ fprintf(stdout, "%s: %s\n", MODULE, res->message);
+ rc = 0;
+ }
+ }
xmlFreeDoc(res_xml);
exit: