Main: move global variables to struct Instance

More preparations for multi-player support.
This commit is contained in:
Max Kellermann
2013-04-17 22:58:33 +02:00
parent 08dfd263ba
commit b2d3d15e97
12 changed files with 149 additions and 38 deletions

View File

@@ -20,6 +20,7 @@
#include "config.h"
#include "Listen.hxx"
#include "Main.hxx"
#include "Instance.hxx"
#include "Client.hxx"
#include "conf.h"
#include "event/ServerSocket.hxx"
@@ -43,7 +44,7 @@ public:
private:
virtual void OnAccept(int fd, const sockaddr &address,
size_t address_length, int uid) {
client_new(*main_loop, *global_partition,
client_new(*main_loop, *instance->partition,
fd, &address, address_length, uid);
}
};