Added custom resource checker

This commit is contained in:
James Booth
2015-05-25 02:18:31 +01:00
parent af73cb82e6
commit 06b18be851
7 changed files with 94 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
#include "resource.h"
int
resource_equal_check(void *param, void *value)
{
Resource *param_res = (Resource *)param;
Resource *value_res = (Resource *)value;
if (g_strcmp0(param_res->name, value_res->name) != 0) {
return 0;
}
if (param_res->presence != value_res->presence) {
return 0;
}
if (param_res->priority != value_res->priority) {
return 0;
}
if (g_strcmp0(param_res->status, value_res->status) != 0) {
return 0;
}
return 1;
}

View File

@@ -0,0 +1,6 @@
#ifndef __H_CHECKERS
#define __H_CHECKERS
int resource_equal_check(void *param, void *value);
#endif