Browse Source

compail about the right plugin and don't segfault

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@680 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.6
Jan Kneschke 17 years ago
parent
commit
326fa40875
  1. 13
      src/connections.c

13
src/connections.c

@ -36,6 +36,10 @@
#include "sys-socket.h"
typedef struct {
PLUGIN_DATA;
} plugin_data;
static connection *connections_get_new_connection(server *srv) {
connections *conns = srv->conns;
size_t i;
@ -712,11 +716,14 @@ int connection_reset(server *srv, connection *con) {
/* the plugins should cleanup themself */
for (i = 0; i < srv->plugins.used; i++) {
if (con->plugin_ctx[i + 1] != NULL) {
log_error_write(srv, __FILE__, __LINE__, "sb", "missing cleanup in", ((plugin **)(srv->plugins.ptr))[i]->name);
plugin *p = ((plugin **)(srv->plugins.ptr))[i];
plugin_data *pd = p->data;
if (con->plugin_ctx[pd->id] != NULL) {
log_error_write(srv, __FILE__, __LINE__, "sb", "missing cleanup in", p->name);
}
con->plugin_ctx[i] = NULL;
con->plugin_ctx[pd->id] = NULL;
}
#if COND_RESULT_UNSET

Loading…
Cancel
Save