MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / checkNext

Method checkNext

src/remote/inet.cpp:290–328  ·  view source on GitHub ↗

get port to check for readyness assume port_mutex is locked

Source from the content-addressed store, hash-verified

288 // get port to check for readyness
289 // assume port_mutex is locked
290 HandleState checkNext(RemPortPtr& port)
291 {
292#ifdef WIRE_COMPRESS_SUPPORT
293 if (slct_zport)
294 {
295 if (slct_zport->port_z_data &&
296 (slct_zport->port_state != rem_port::DISCONNECTED))
297 {
298 port = slct_zport;
299 slct_zport = nullptr; // Will be set again by select_multi() if needed
300 return SEL_READY;
301 }
302
303 slct_zport = nullptr;
304 }
305#endif
306
307 if (slct_port && slct_port->port_state == rem_port::DISCONNECTED)
308 {
309 // restart from main port
310 slct_port = nullptr;
311 if (slct_main && slct_main->port_state == rem_port::DISCONNECTED)
312 slct_main = nullptr;
313
314 slct_port = slct_main;
315 }
316
317 port = slct_port;
318 if (!slct_port)
319 return SEL_NO_DATA;
320
321#ifdef WIRE_COMPRESS_SUPPORT
322 if (slct_port->port_z_data)
323 return SEL_READY;
324#endif
325
326 slct_port = slct_port->port_next;
327 return ok(port);
328 }
329
330 void setZDataPort(RemPortPtr& port)
331 {

Callers 1

select_portFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected