#include <iostream>
#include <gio/gio.h>
#include <cassert>
+#include <stdlib.h>
#include <unistd.h>
#include "sessiond.h"
if (add_user_res != 0)
{
printf("Error: subsession_add_user result is %d\n", add_user_res);
- return -1;
+ return EXIT_FAILURE;
}
g_mutex_lock(&mutex);
}
else
{
printf("Register event callback error\n");
- return -1;
+ return EXIT_FAILURE;
}
printf("Lp. ");
if (res != i)
{
printf("Switch user error\n");
- return -1;
+ return EXIT_FAILURE;
}
}
else
{
printf("Register event callback error\n");
- return -1;
+ return EXIT_FAILURE;
}
///===================================///
printf("Subsession unregister event callback test...");
if (res != i)
{
printf("Switch user error\n");
- return -1;
+ return EXIT_FAILURE;
}
}
else
{
printf("Register event callback error\n");
- return -1;
+ return EXIT_FAILURE;
}
///======================================///
printf("Removing users...");
if (end_res != 0)
{
printf("Error setting user to 0\n");
- return -1;
+ return EXIT_FAILURE;
}
for (int i = firstUser; i <= lastUser; ++i)
{
if (remove_user_res != 0)
{
printf("removing user %d failed code: %d\n", i,remove_user_res);
- return -1;
+ return EXIT_FAILURE;
}
}
green_print("done");
g_mutex_unlock(&mutex);
g_mutex_clear(&mutex);
printf("Test program end\n");
- return 0;
+ return EXIT_SUCCESS;
}