TEST: fix the print out when cpg_finalize() fails

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
This commit is contained in:
Angus Salkeld 2010-12-14 17:15:08 +11:00
parent f55b23eaa9
commit 25751d12d2
2 changed files with 4 additions and 3 deletions

View File

@ -190,7 +190,7 @@ int main (void) {
res = cpg_finalize (handle);
if (res != CS_OK) {
printf ("cpg_join failed with result %d\n", res);
printf ("cpg_finalize failed with result %d\n", res);
exit (1);
}
return (0);

View File

@ -53,6 +53,7 @@
#include <corosync/corotypes.h>
#include <corosync/cpg.h>
#include "../lib/util.h"
#ifndef timersub
#define timersub(a, b, result) \
@ -176,7 +177,7 @@ int main (void) {
res = cpg_join (handle, &group_name);
if (res != CS_OK) {
printf ("cpg_join failed with result %d\n", res);
printf ("cpg_join failed with result %s\n", cs_strerror(res));
exit (1);
}
@ -187,7 +188,7 @@ int main (void) {
res = cpg_finalize (handle);
if (res != CS_OK) {
printf ("cpg_join failed with result %d\n", res);
printf ("cpg_finalize failed with result %s\n", cs_strerror(res));
exit (1);
}
return (0);