diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2009-10-19 15:56:49 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2009-10-19 15:56:49 +0200 |
commit | 89af818dd8de703222fe2273c31fcb6b041dc6ee (patch) | |
tree | 69ef680f91762d7c2d51a629fe770e30e80fcbf0 /eurephiadm | |
parent | 69a0048269c20777633ed9c10523e476dc77e70a (diff) | |
download | eurephia-89af818dd8de703222fe2273c31fcb6b041dc6ee.tar.gz eurephia-89af818dd8de703222fe2273c31fcb6b041dc6ee.tar.xz eurephia-89af818dd8de703222fe2273c31fcb6b041dc6ee.zip |
Make use of eurephiaXML_ParseResultMsg() in usercerts command
Diffstat (limited to 'eurephiadm')
-rw-r--r-- | eurephiadm/commands/usercerts.c | 18 |
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: |