Beispiel #1
0
void
directory_prune_empty(struct directory *directory)
{
	assert(holding_db_lock());

	struct directory *child, *n;
	directory_for_each_child_safe(child, n, directory) {
		directory_prune_empty(child);

		if (directory_is_empty(child))
			directory_delete(child);
	}
Beispiel #2
0
Directory * directory_new(AppServerOptions options, Event * event)
{
	Directory * directory;

	if((directory = object_new(sizeof(*directory))) == NULL)
		return NULL;
	_new_config(directory);
	directory->appserver = appserver_new_event(PACKAGE, options, event);
	if(directory->config == NULL
			|| directory->appserver == NULL)
	{
		directory_delete(directory);
		return NULL;
	}
	config = directory->config; /* FIXME ugly work-around */
	return directory;
}