Browse Source

fixed segfault in server_free() if workers are not allocated yet; removed virtualrequest.h include from base.h

personal/stbuehler/wip
Thomas Porzelt 14 years ago
parent
commit
604042b24c
  1. 1
      src/base.h
  2. 4
      src/server.c

1
src/base.h

@ -44,7 +44,6 @@ typedef struct connection connection;
#include "plugin.h"
#include "request.h"
#include "response.h"
#include "virtualrequest.h"
#include "log.h"
#include "connection.h"

4
src/server.c

@ -85,7 +85,7 @@ void server_free(server* srv) {
/* join all workers */
{
guint i;
for (i = 1; i < srv->worker_count; i++) {
for (i = 1; i < srv->workers->len; i++) {
worker *wrk;
wrk = g_array_index(srv->workers, worker*, i);
worker_exit(srv->main_worker, wrk);
@ -96,7 +96,7 @@ void server_free(server* srv) {
/* free all workers */
{
guint i;
for (i = 0; i < srv->worker_count; i++) {
for (i = 0; i < srv->workers->len; i++) {
worker *wrk;
struct ev_loop *loop;
wrk = g_array_index(srv->workers, worker*, i);

Loading…
Cancel
Save