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;
//const char *options[];
unsigned short listenport;
Routerin routerin;
// = {"listening_ports", "8080", NULL};
public:
@ -29,10 +28,11 @@ class MongooseHandler{
listenport(listenport)
{
char portstring[8];
Routerin *routerin = Routerin::get_instance();
std::snprintf(portstring,8,"%d",this->listenport);
const char *options[] =
{"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: