|
|
@ -300,6 +300,10 @@ int main(int argc, char *argv[])
|
|
|
|
}else if(config.listeners[i].protocol == mp_websockets){
|
|
|
|
}else if(config.listeners[i].protocol == mp_websockets){
|
|
|
|
#ifdef WITH_WEBSOCKETS
|
|
|
|
#ifdef WITH_WEBSOCKETS
|
|
|
|
config.listeners[i].ws_context = mosq_websockets_init(&config.listeners[i]);
|
|
|
|
config.listeners[i].ws_context = mosq_websockets_init(&config.listeners[i]);
|
|
|
|
|
|
|
|
if(!config.listeners[i].ws_context){
|
|
|
|
|
|
|
|
_mosquitto_log_printf(NULL, MOSQ_LOG_ERR, "Error: Unable to create websockets listener on port %d.", config.listeners[i].port);
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|