Previous 199869 Revisions Next

r24863 Tuesday 13th August, 2013 at 08:33:12 UTC by Miodrag Milanović
fix compile with DEBUG=1 (nw)
[src/emu]webengine.c

trunk/src/emu/webengine.c
r24862r24863
132132static void websocket_ready_handler_static(struct mg_connection *conn)
133133{
134134   const struct mg_request_info *request_info = mg_get_request_info(conn);
135    web_engine *engine = downcast<web_engine *>(request_info->user_data);
135    web_engine *engine = static_cast<web_engine *>(request_info->user_data);
136136   engine->websocket_ready_handler(conn);
137137}
138138
r24862r24863
140140                                  char *data, size_t data_len)
141141{
142142   const struct mg_request_info *request_info = mg_get_request_info(conn);
143    web_engine *engine = downcast<web_engine *>(request_info->user_data);
143    web_engine *engine = static_cast<web_engine *>(request_info->user_data);
144144   return engine->websocket_data_handler(conn, flags, data, data_len);
145145}
146146
147147static int begin_request_handler_static(struct mg_connection *conn)
148148{
149149   const struct mg_request_info *request_info = mg_get_request_info(conn);   
150    web_engine *engine = downcast<web_engine *>(request_info->user_data);
150    web_engine *engine = static_cast<web_engine *>(request_info->user_data);
151151   return engine->begin_request_handler(conn);
152152}
153153
154154static void *websocket_keepalive_static(void *thread_func_param)
155155{
156   web_engine *engine = downcast<web_engine *>(thread_func_param);
156   web_engine *engine = static_cast<web_engine *>(thread_func_param);
157157   return engine->websocket_keepalive();
158158}
159159
r24862r24863
225225{
226226   for (simple_list_wrapper<mg_connection> *curitem = m_websockets.first(); curitem != NULL; curitem = curitem->next())
227227   {     
228      mg_websocket_write(curitem->object(), WEBSOCKET_OPCODE_TEXT, message, strlen(message));
228      int status = mg_websocket_write(curitem->object(), WEBSOCKET_OPCODE_TEXT, message, strlen(message));
229      if (status==0) m_websockets.remove(*curitem); // remove inactive clients
229230   }
230231}

Previous 199869 Revisions Next


© 1997-2024 The MAME Team