fixed segfault if no global mysql-vhost-config was set (fixes #268)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@722 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.6
Jan Kneschke 2005-09-21 11:14:42 +00:00
parent 89ff779a78
commit 09a26806f4
1 changed files with 4 additions and 1 deletions

View File

@ -90,6 +90,8 @@ SERVER_FUNC(mod_mysql_vhost_cleanup) {
size_t i;
for (i = 0; i < srv->config_context->used; i++) {
plugin_config *s = p->config_storage[i];
if (!s) continue;
mysql_close(s->mysql);
@ -318,10 +320,11 @@ CONNECTION_FUNC(mod_mysql_vhost_handle_docroot) {
unsigned cols;
MYSQL_ROW row;
MYSQL_RES *result = NULL;
size_t i;
/* no host specified? */
if (!con->uri.authority->used) return HANDLER_GO_ON;
if (!p->conf.mysql) return HANDLER_GO_ON;
mod_mysql_vhost_patch_connection(srv, con, p);