|
|
|
@ -568,19 +568,17 @@ int bridge__on_connect(struct mosquitto *context)
|
|
|
|
|
|
|
|
|
|
int bridge__register_local_connections(void)
|
|
|
|
|
{
|
|
|
|
|
#ifdef WITH_EPOLL
|
|
|
|
|
struct mosquitto *context, *ctxt_tmp = NULL;
|
|
|
|
|
|
|
|
|
|
HASH_ITER(hh_sock, db.contexts_by_sock, context, ctxt_tmp){
|
|
|
|
|
if(context->bridge){
|
|
|
|
|
if(mux__add_in(context)){
|
|
|
|
|
log__printf(NULL, MOSQ_LOG_ERR, "Error in epoll initial registering bridge: %s", strerror(errno));
|
|
|
|
|
log__printf(NULL, MOSQ_LOG_ERR, "Error in initial bridge registration: %s", strerror(errno));
|
|
|
|
|
return MOSQ_ERR_UNKNOWN;
|
|
|
|
|
}
|
|
|
|
|
mux__add_out(context);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
return MOSQ_ERR_SUCCESS;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|