From b61a71e6ae7668c394d50b9692544accbd0d6d66 Mon Sep 17 00:00:00 2001 From: Aaron Blakely Date: Tue, 5 Mar 2024 20:12:10 -0600 Subject: [PATCH] more work on db.c --- Makefile | 2 ++ lib/db.h | 13 +++++++---- lib/irc.h | 5 ++++ src/config.c | 3 +++ src/db.c | 65 +++++++++++++++++++++++++++++++++++++-------------- src/main.c | 20 ++++++++++++++++ test.db | Bin 8386 -> 8386 bytes test1.db | Bin 0 -> 8386 bytes test_db.c | 34 ++++++++++++++++++++++----- testdb | Bin 21392 -> 21928 bytes xbot.cfg | 2 ++ xbot.db | Bin 0 -> 133 bytes 12 files changed, 117 insertions(+), 27 deletions(-) create mode 100755 test1.db create mode 100755 xbot.db diff --git a/Makefile b/Makefile index 2806cd1..9d30eb8 100755 --- a/Makefile +++ b/Makefile @@ -22,6 +22,8 @@ main: $(CC) $(CFLAGS) $(SRC)/module.c -o $(OBJ)/module.o $(CC) $(CFLAGS) $(SRC)/channel.c -o $(OBJ)/channel.o $(CC) $(CFLAGS) $(SRC)/timers.c -o $(OBJ)/timers.o + $(CC) $(CFLAGS) $(SRC)/db.c -o $(OBJ)/db.o + $(CC) -o $(EXEC) $(OBJECTS) $(BINFLAGS) @echo "All Done!" diff --git a/lib/db.h b/lib/db.h index 3f7d82e..56fb2bd 100755 --- a/lib/db.h +++ b/lib/db.h @@ -1,10 +1,15 @@ #ifndef DB_H #define DB_H +#define DB_MAGIC 0xdeadbeef +#define DB_VER 0x10 + struct db_hash { - char key[85]; - char value[4096]; + int key_len; + int value_len; + char *key; + char *value; }; struct db_table @@ -18,8 +23,8 @@ struct db_table int write_db(struct db_table *db, char *fname); struct db_table *read_db(char *fname); -int add_hash(struct db_table *db, char *key, char *value); -int del_hash(struct db_table *db, char *key); +int db_add_hash(struct db_table *db, char *key, char *value); +int db_del_hash(struct db_table *db, char *key); char *get_hash(struct db_table *db, char *key); #endif diff --git a/lib/irc.h b/lib/irc.h index f4c44cb..6867419 100755 --- a/lib/irc.h +++ b/lib/irc.h @@ -9,6 +9,8 @@ #include +#include "db.h" + #ifdef _WIN32 #include #endif @@ -30,6 +32,9 @@ struct irc_conn char port[5]; char real_name[512]; + char db_file[256]; + struct db_table *db; + // I/O Buffers char *out; char *in; diff --git a/src/config.c b/src/config.c index bcd6fbf..22698cc 100755 --- a/src/config.c +++ b/src/config.c @@ -41,6 +41,9 @@ struct irc_conn read_config(struct irc_conn bot, char *file) if (config_lookup_string(cf, "bot.admin", &base)) strlcpy(bot.admin, base, sizeof bot.admin); + if (config_lookup_string(cf, "bot.db", &base)) + strlcpy(bot.db_file, base, sizeof bot.db_file); + autoload = config_lookup(cf, "mods.autoload"); count = config_setting_length(autoload); diff --git a/src/db.c b/src/db.c index cf40b71..43048d2 100755 --- a/src/db.c +++ b/src/db.c @@ -16,10 +16,21 @@ int write_db(struct db_table *db, char *fname) return -1; } - db->db_magic = 0xdeadbeef; - db->db_ver = 0x10; + db->db_magic = DB_MAGIC; + db->db_ver = DB_VER; - fwrite(db, sizeof(struct db_table) + (sizeof(struct db_hash) * db->count), 1, fp); + // write the header + fwrite(db, sizeof(struct db_table), 1, fp); + + // write the hashes + fwrite(db->hashes, sizeof(struct db_hash), db->count, fp); + + // write the keys and values + for (i = 0; i < db->count; i++) + { + fwrite(db->hashes[i].key, sizeof(char), db->hashes[i].key_len, fp); + fwrite(db->hashes[i].value, sizeof(char), db->hashes[i].value_len, fp); + } fclose(fp); @@ -30,6 +41,7 @@ struct db_table *read_db(char *fname) { FILE *fp; struct db_table *db; + int tmp; if ((fp = fopen(fname, "rb")) == NULL) { @@ -41,35 +53,43 @@ struct db_table *read_db(char *fname) fread(db, sizeof(struct db_table), 1, fp); // check the magic value - if (db->db_magic != 0xdeadbeef) + if (db->db_magic != DB_MAGIC) { - printf("Error: %s incompatible or unknown db file format\n", fname); + printf("Error: %s incompatible or unknown db file format: Bad Magic\n", fname); return NULL; } // check the version - if (db->db_ver != 0x10) + if (db->db_ver != DB_VER) { - printf("Error: %s incompatible or unknown db file format\n", fname); + printf("Error: %s incompatible or unknown db file format: Incompatible Version\n", fname); return NULL; } - db->hashes = (struct db_hash *)malloc(sizeof(struct db_hash) * db->count); - - // skip padding - fseek(fp, 8, SEEK_CUR); + tmp = db->count != 0 ? db->count : sizeof(struct db_hash); + db->hashes = (struct db_hash *)malloc(sizeof(struct db_hash) * tmp); fread(db->hashes, sizeof(struct db_hash), db->count, fp); + // read the keys and values + for (tmp = 0; tmp < db->count; tmp++) + { + db->hashes[tmp].key = (char *)malloc(sizeof(char) * db->hashes[tmp].key_len); + db->hashes[tmp].value = (char *)malloc(sizeof(char) * db->hashes[tmp].value_len); + + fread(db->hashes[tmp].key, sizeof(char), db->hashes[tmp].key_len, fp); + fread(db->hashes[tmp].value, sizeof(char), db->hashes[tmp].value_len, fp); + } + fclose(fp); return db; } -int add_hash(struct db_table *db, char *key, char *value) +int db_add_hash(struct db_table *db, char *key, char *value) { int i; @@ -83,17 +103,28 @@ int add_hash(struct db_table *db, char *key, char *value) db->hashes = (struct db_hash *)realloc(db->hashes, sizeof(struct db_hash) * (db->count + 1)); - memset(db->hashes[db->count].key, 0, sizeof(db->hashes[db->count].key)); - memset(db->hashes[db->count].value, 0, sizeof(db->hashes[db->count].value)); + // zero out reallocated memory + memset(&db->hashes[db->count], 0, sizeof(struct db_hash)); - strlcpy(db->hashes[db->count].key, key, sizeof(db->hashes[db->count].key)); - strlcpy(db->hashes[db->count].value, value, sizeof(db->hashes[db->count].value)); + db->hashes[db->count].key_len = strlen(key) + 1; + db->hashes[db->count].value_len = strlen(value) + 1; + + printf("key_len: %d, value_len: %d\n", sizeof(char) * db->hashes[db->count].key_len, sizeof(char) * db->hashes[db->count].value_len); + + db->hashes[db->count].key = (char *)malloc(sizeof(char) * db->hashes[db->count].key_len); + db->hashes[db->count].value = (char *)malloc(sizeof(char) * db->hashes[db->count].value_len); + + memset(db->hashes[db->count].key, 0, sizeof(char) * db->hashes[db->count].key_len); + memset(db->hashes[db->count].value, 0, sizeof(char) * db->hashes[db->count].value_len); + + strlcpy(db->hashes[db->count].key, key, sizeof(char) * db->hashes[db->count].key_len); + strlcpy(db->hashes[db->count].value, value, sizeof(char) * db->hashes[db->count].value_len); db->count++; return 0; } -int del_hash(struct db_table *db, char *key) +int db_del_hash(struct db_table *db, char *key) { int i; diff --git a/src/main.c b/src/main.c index 041a4ab..ba166b2 100755 --- a/src/main.c +++ b/src/main.c @@ -9,8 +9,11 @@ #include #include #include +#include + #include "config.h" #include "irc.h" +#include "db.h" #include "util.h" #include "events.h" #include "module.h" @@ -50,6 +53,23 @@ int main() // Read the config bot = read_config(bot, "xbot.cfg"); + // check if the db exists, if not, create it + if (access(bot.db_file, F_OK) == -1) + { + printf("Creating db\n"); + bot.db = (struct db_table *)malloc(sizeof(struct db_table)); + memset(bot.db, 0, sizeof(struct db_table)); + + bot.db->count = 0; + bot.db->hashes = NULL; + + write_db(bot.db, bot.db_file); + } + else + { + bot.db = read_db(bot.db_file); + } + // Connect to the server printf("Connecting to %s...\n", bot.host); diff --git a/test.db b/test.db index 1fd816b47c50e8b4cd193c28c81adb98ef00fe51..aa5dc1650c8846662663320d69f62e04a006557f 100755 GIT binary patch delta 31 hcmX@)c*s%g{l2yL1Q-|?n1C1r4onIKf{kKp6ac8_37`M~ delta 31 jcmX@)c*s%g{l2yL1Q-|?n1C1r4hS9o*c7u-Y>ff{txO7D diff --git a/test1.db b/test1.db new file mode 100755 index 0000000000000000000000000000000000000000..b4cdfc9e0fef37b98f310daac4cf9c533e07b85f GIT binary patch literal 8386 zcmeI$!3n}J6vpv~6F5Q#kRIH{0cr?X2u*2T4ld#ru267;PS6!x!K5C#zym$}A0)iw z@V)Rm<~={xqlg^Js #include #include +#include -#define FNAME "test.db" +#define FNAME "xbot.db" int main() { struct db_table *db; int i; + /* db = (struct db_table *)malloc(sizeof(struct db_table)); db->count = 0; db->hashes = NULL; - add_hash(db, "lua.scripts", "hello.lua,test.lua,youtube.lua"); - add_hash(db, "lua.scriptcount", "2"); + db_add_hash(db, "lua.scripts", "hello.lua,test.lua,youtube.lua"); + db_add_hash(db, "lua.scriptcount", "2"); if (write_db(db, FNAME) == -1) { @@ -23,16 +25,36 @@ int main() } free(db); + */ - db = read_db(FNAME); + if (access(FNAME, F_OK) == -1) + { + printf("Creating db\n"); + + db = (struct db_table *)malloc(sizeof(struct db_table)); + db->count = 0; + db->hashes = NULL; + } + else + { + db = read_db(FNAME); + } + + // write some data if db is empty + if (db->count == 0) + { + db_add_hash(db, "lua.scripts", "hello.lua,test.lua,youtube.lua"); + db_add_hash(db, "lua.scriptcount", "2"); + write_db(db, FNAME); + + return 0; + } for (i = 0; i < db->count; i++) { printf("Key: %s, Value: %s\n", db->hashes[i].key, db->hashes[i].value); } - printf("test: lua.scripts: %s\n", get_hash(db, "lua.scripts")); - free(db); return 0; diff --git a/testdb b/testdb index c6f3e382413fe5b706b2568379d8dc18bb0818cf..6aa938808ec61d27353943ff9229645a67f3bb41 100755 GIT binary patch literal 21928 zcmeHPdwf*Yoj-SGPBOzJnUD|&_{hY9fWm|TB9BA{LU01%Q3Y2hI80_H$&_R!oy_oX zb)|{6jz|}@wboLqw!3|7ZSA((^3ko0j}>(Lz_x2?YiqV2+a@2ZwTNwMt=aGIJZA3P zWRUic-TfmcpWNU1{m$=oe&;#&o_lX=Ze43L45pKvUBd|TPL>qED)@Y>$^iJ;QdWxV zO!gjD1l%ELvfM8LN@Y52%ZE-yw*!(~HD$(u7fUkJPZQVtUa$RXBPNTRX+{Qaul0W^QGLW#(a2O$qgu|3#F}EnPBy$zoq`!naVkKz=R2 zKlQ0=H*RIN18jh3THatr9&S@OSVSV;Dfp+bll-&WP8P3d{oeD$K)<{IouPcJ~fxd8oT(7pJ#rfWgC%t|D@C!OkL z?a64AE};nPj&^q^_5e%tMB}VCmFxmQNmo}Q%(^8A2GQ%o!QNCTnF@A?VsRD>hWCYn z?Xh^MD|R!4!(EBqDCz2rrdUrh7EiScUE!YnEEEn$dtq~LGM0)GHQe39NFj}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L diff --git a/xbot.cfg b/xbot.cfg index 3c64ecf..9c1a975 100755 --- a/xbot.cfg +++ b/xbot.cfg @@ -6,6 +6,8 @@ bot: nick = "xbot"; user = "xbot"; admin = "ab3800"; + + db = "xbot.db"; }; server: diff --git a/xbot.db b/xbot.db new file mode 100755 index 0000000000000000000000000000000000000000..c826d12aca63fb80adbb7cb40f5163eb37623b5c GIT binary patch literal 133 zcmaFAZ|yw+1_lNuAO-=4>7hWtz`z4!%LDO;X%M~uR2-)E0#v*KDxOoCs8^g^lvz+x o%#e|qlasFp6wxV3EiM5wD)UQAN|RDSYzBnV