Undo all the work on determinism in the driver. New plan soon.
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
|
||||
#include "driver.hpp"
|
||||
#include "umm-malloc.hpp"
|
||||
#include "driver-util.hpp"
|
||||
#include "util.hpp"
|
||||
#include "drivenengine.hpp"
|
||||
#include "dummycert.hpp"
|
||||
#include "util.hpp"
|
||||
#include "textgame.hpp"
|
||||
#include "lpxclient.hpp"
|
||||
#include "lpxserver.hpp"
|
||||
#include "drivertests.hpp"
|
||||
#include "source.hpp"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
@@ -30,11 +34,18 @@
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/conf.h>
|
||||
|
||||
#define OPENSSL_HEAP_SIZE (4*1024*1024)
|
||||
#define CHBUF_SIZE (256*1024)
|
||||
#define POLLVEC_SIZE (DrivenEngine::MAX_CHAN+1)
|
||||
|
||||
using SOCKET=int;
|
||||
const int INVALID_SOCKET = -1;
|
||||
|
||||
struct termios orig_termios;
|
||||
static std::unique_ptr<char[]> chbuf;
|
||||
static std::unique_ptr<struct pollfd[]> pollvec;
|
||||
|
||||
static UmmString strerror_str(int err) {
|
||||
char errbuf[256];
|
||||
@@ -255,10 +266,6 @@ static void disable_randomization(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
void driver_sysinit(int argc, char *argv[]) {
|
||||
disable_randomization(argc, argv);
|
||||
enable_tty_raw();
|
||||
}
|
||||
|
||||
class MonoClock {
|
||||
private:
|
||||
@@ -279,3 +286,16 @@ public:
|
||||
};
|
||||
|
||||
#include "driver-common.cpp"
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
disable_randomization(argc, argv);
|
||||
enable_tty_raw();
|
||||
chbuf.reset(new char[CHBUF_SIZE]);
|
||||
pollvec.reset(new struct pollfd[POLLVEC_SIZE]);
|
||||
OPENSSL_init_ssl(0, NULL);
|
||||
initialize_engine();
|
||||
driver_drive(argc, argv);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user