You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lighttpd2/src/server.c

30 lines
549 B

14 years ago
14 years ago
#include "base.h"
#include "log.h"
14 years ago
14 years ago
server* server_new() {
14 years ago
server* srv = g_slice_new0(server);
srv->plugins = g_hash_table_new(g_str_hash, g_str_equal);
srv->options = g_hash_table_new(g_str_hash, g_str_equal);
srv->mutex = g_mutex_new();
14 years ago
return srv;
}
void server_free(server* srv) {
14 years ago
if (!srv) return;
/* TODO */
g_hash_table_destroy(srv->plugins);
g_hash_table_destroy(srv->options);
g_mutex_free(srv->mutex);
/* free logs */
g_hash_table_destroy(srv->logs);
g_async_queue_unref(srv->log_queue);
14 years ago
g_slice_free(server, srv);
}