adjust using of routerin

This commit is contained in:
blastmaster 2014-01-23 02:22:57 +01:00
parent 7f5e571dfb
commit 5cba410e54
1 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,6 @@ class MongooseHandler{
struct mg_context *ctx; struct mg_context *ctx;
//const char *options[]; //const char *options[];
unsigned short listenport; unsigned short listenport;
Routerin routerin;
// = {"listening_ports", "8080", NULL}; // = {"listening_ports", "8080", NULL};
public: public:
@ -29,10 +28,11 @@ class MongooseHandler{
listenport(listenport) listenport(listenport)
{ {
char portstring[8]; char portstring[8];
Routerin *routerin = Routerin::get_instance();
std::snprintf(portstring,8,"%d",this->listenport); std::snprintf(portstring,8,"%d",this->listenport);
const char *options[] = const char *options[] =
{"listening_ports",portstring,nullptr}; {"listening_ports",portstring,nullptr};
this->ctx= mg_start(options, routerin.event_route,nullptr); this->ctx= mg_start(options, routerin->event_route, nullptr);
} }
//no copy constructor: //no copy constructor: