| 237 | } |
| 238 | |
| 239 | void janus_worker_loop(int proc_no) |
| 240 | { |
| 241 | janus_set_mgr_proc_no(); |
| 242 | |
| 243 | if (init_worker_reactor("JANUS Manager", RCT_PRIO_MAX) != 0) { |
| 244 | LM_BUG("failed to init JANUS reactor"); |
| 245 | abort(); |
| 246 | } |
| 247 | |
| 248 | if (reactor_add_reader(IPC_FD_READ_SELF, F_IPC, RCT_PRIO_ASYNC, NULL)<0){ |
| 249 | LM_CRIT("failed to add IPC pipe to FS reactor\n"); |
| 250 | abort(); |
| 251 | } |
| 252 | |
| 253 | /* connect to all JANUS servers now */ |
| 254 | janus_reconnects(); |
| 255 | |
| 256 | reactor_main_loop(JANUS_REACTOR_TIMEOUT, out_err, janus_reconnects()); |
| 257 | |
| 258 | out_err: |
| 259 | destroy_io_wait(&_worker_io); |
| 260 | abort(); |
| 261 | } |
| 262 | |
| 263 | uint64_t janus_ipc_send_request(janus_connection *sock, cJSON *janus_cmd) |
| 264 | { |
nothing calls this directly
no test coverage detected