From d9d36fc09996ed8c2574f9336c3594aa3cc56941 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 21 Dec 2005 13:13:10 +0100 Subject: Add initial draft of BitlBee schema --- storage.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'storage.c') diff --git a/storage.c b/storage.c index b766c9e3..7a242c3c 100644 --- a/storage.c +++ b/storage.c @@ -6,6 +6,8 @@ /* Support for multiple storage backends */ +/* Copyright (C) 2005 Jelmer Vernooij */ + /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -- cgit v1.2.3 From c121f8945f7249520342ad86ff00f4986642ca0a Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 14 Jun 2006 22:30:25 +0200 Subject: xml_load() works pretty well now. --- storage.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'storage.c') diff --git a/storage.c b/storage.c index 7a242c3c..b8e07278 100644 --- a/storage.c +++ b/storage.c @@ -30,9 +30,9 @@ #include "crypting.h" extern storage_t storage_text; +extern storage_t storage_xml; -static GList text_entry = { &storage_text, NULL, NULL }; -static GList *storage_backends = &text_entry; +static GList *storage_backends = NULL; void register_storage_backend(storage_t *backend) { @@ -64,7 +64,10 @@ GList *storage_init(const char *primary, char **migrate) GList *ret = NULL; int i; storage_t *storage; - + + register_storage_backend(&storage_text); + register_storage_backend(&storage_xml); + storage = storage_init_single(primary); if (storage == NULL) return NULL; -- cgit v1.2.3 From b3c467bc312114eb7cdd45e6bc36a3d87bee6064 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 28 Jun 2006 11:59:33 +0200 Subject: Cleaned up Makefiles + configure: Cleaning up bitlbee.pc, removed the second piece of libevent probing code that mysteriously appeared (?), better handling of storage backends, an SSL module is now always included (so BitlBee can be compiled again when building without MSN- and Jabber-support (http_client also depends on SSL libs and can't be disabled)), oh, and fixed a compiler warning. --- storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'storage.c') diff --git a/storage.c b/storage.c index b8e07278..807d5bb4 100644 --- a/storage.c +++ b/storage.c @@ -42,7 +42,7 @@ void register_storage_backend(storage_t *backend) static storage_t *storage_init_single(const char *name) { GList *gl; - storage_t *st; + storage_t *st = NULL; for (gl = storage_backends; gl; gl = gl->next) { st = gl->data; -- cgit v1.2.3 From 7e3592e96b27ec8375e4b28354bcf9ed4cf5943b Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 5 Jul 2006 20:34:31 +0200 Subject: Fixed text_load(), added detection of primary storage backends without save support (which shouldn't be allowed) and added a call to nick_lc() to xml_save() so at least nicks should now be case-insensitive. --- storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'storage.c') diff --git a/storage.c b/storage.c index 807d5bb4..06044f80 100644 --- a/storage.c +++ b/storage.c @@ -69,7 +69,7 @@ GList *storage_init(const char *primary, char **migrate) register_storage_backend(&storage_xml); storage = storage_init_single(primary); - if (storage == NULL) + if (storage == NULL && storage->save == NULL) return NULL; ret = g_list_append(ret, storage); -- cgit v1.2.3