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

Function cleanup_ports

src/remote/inet.cpp:1862–1886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1860
1861
1862static int cleanup_ports(const int, const int, void* /*arg*/)
1863{
1864/**************************************
1865 *
1866 * c l e a n u p _ p o r t s
1867 *
1868 **************************************
1869 *
1870 * Functional description
1871 * Shutdown all active connections
1872 * to allow correct shutdown.
1873 *
1874 **************************************/
1875 INET_shutting_down = true;
1876
1877 inet_ports->closePorts();
1878
1879 while (ports_to_close->hasData())
1880 {
1881 SOCKET s = ports_to_close->pop();
1882 SOCLOSE(s);
1883 }
1884
1885 return 0;
1886}
1887
1888
1889#ifdef NO_FORK

Callers

nothing calls this directly

Calls 4

SOCLOSEFunction · 0.85
closePortsMethod · 0.80
hasDataMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected