Browse Source

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 17 years ago
parent
commit
09a26806f4
  1. 5
      src/mod_mysql_vhost.c

5
src/mod_mysql_vhost.c

@ -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);

Loading…
Cancel
Save