]> git.proxmox.com Git - mirror_corosync.git/commitdiff
Remove unchecked return error in test code
authorSteven Dake <sdake@redhat.com>
Mon, 31 Oct 2011 22:54:07 +0000 (15:54 -0700)
committerSteven Dake <sdake@redhat.com>
Sat, 26 Nov 2011 15:50:25 +0000 (08:50 -0700)
Signed-off-by: Steven Dake <sdake@redhat.com>
cts/agents/sam_test_agent.c

index 604cbc64d8e750d22cbfd67b74c6419aff129e53..9e681be749f284694c2983e3fa50506f7c6067a0 100644 (file)
@@ -1471,8 +1471,13 @@ static void do_command (int sock, char* func, char*args[], int num_args)
        } else if (strcmp ("setup_hc", func) == 0) {
                err = setup_hc ();
        } else if (strcmp ("sam_stop", func) == 0) {
-               sam_stop ();
-               sam_finalize();
+               err = sam_stop ();
+               if (err != CS_OK) {
+                       err = -1;
+                       syslog (LOG_ERR,"%s RPC:%s sam_stop failed!", __func__, func);
+                       snprintf (response, 100, "%s", FAIL_STR);
+               }
+               err = sam_finalize();
        } else {
                err = -1;
                syslog (LOG_ERR,"%s RPC:%s not supported!", __func__, func);