summaryrefslogtreecommitdiffstats
path: root/src/dbi.h
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-09-18 15:21:19 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-09-22 15:20:57 +0200
commitcbd9421bae01c62c249cc390af5dfcdf19930e46 (patch)
treeec9726a3956d1da0079cae54b3575d945c3d732d /src/dbi.h
parentd7e2022bdd1626fbcb614710bec20b4a42278f9a (diff)
#941 Extend og_dbi_get_computer_info(...)
For the strings in og_computer we do not need to know the max size in advance but instead we need to free up memmory using og_dbi_free_computer_info(...) function.
Diffstat (limited to 'src/dbi.h')
-rw-r--r--src/dbi.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/dbi.h b/src/dbi.h
index ec7c042..84b898c 100644
--- a/src/dbi.h
+++ b/src/dbi.h
@@ -2,6 +2,7 @@
#define __OG_DBI
#include <dbi/dbi.h>
+#include <stdbool.h>
struct og_dbi_config {
const char *user;
@@ -50,15 +51,28 @@ struct og_legacy_partition {
extern struct og_dbi_config dbi_config;
struct og_computer {
- unsigned int id;
+ unsigned int procedure_id;
+ unsigned int hardware_id;
+ unsigned int repo_id;
unsigned int center;
unsigned int room;
- char name[OG_DB_COMPUTER_NAME_MAXLEN + 1];
- unsigned int procedure_id;
+ unsigned int id;
+ bool maintenance;
+ bool remote;
+ char *serial_number;
+ char *netdriver;
+ char *netiface;
+ char *netmask;
+ char *livedir;
+ char *name;
+ char *boot;
+ char *mac;
+ char *ip;
};
struct in_addr;
int og_dbi_get_computer_info(struct og_dbi *dbi, struct og_computer *computer,
struct in_addr addr);
+void og_dbi_free_computer_info(struct og_computer *computer);
#endif