diff -urN openvpn-2.3.7.orig/src/openvpn/init.c openvpn-2.3.7.new/src/openvpn/init.c
old
|
new
|
|
1825 | 1825 | * Possible hold on initialization |
1826 | 1826 | */ |
1827 | 1827 | static bool |
1828 | | do_hold (void) |
| 1828 | do_hold (struct context *c) |
1829 | 1829 | { |
1830 | 1830 | #ifdef ENABLE_MANAGEMENT |
1831 | 1831 | if (management) |
1832 | 1832 | { |
| 1833 | /* if c is defined, daemonize before hold */ |
| 1834 | if (c && c->options.daemon && management_should_daemonize (management)) |
| 1835 | do_init_first_time (c); |
| 1836 | |
1833 | 1837 | /* block until management hold is released */ |
1834 | 1838 | if (management_hold (management)) |
1835 | 1839 | return true; |
… |
… |
|
1895 | 1899 | c->persist.restart_sleep_seconds = 0; |
1896 | 1900 | |
1897 | 1901 | /* do managment hold on context restart, i.e. second, third, fourth, etc. initialization */ |
1898 | | if (do_hold ()) |
| 1902 | if (do_hold (NULL)) |
1899 | 1903 | sec = 0; |
1900 | 1904 | |
1901 | 1905 | if (sec) |
… |
… |
|
1914 | 1918 | if (!c->first_time) |
1915 | 1919 | socket_restart_pause (c); |
1916 | 1920 | else |
1917 | | do_hold (); /* do management hold on first context initialization */ |
| 1921 | do_hold (NULL); /* do management hold on first context initialization */ |
1918 | 1922 | } |
1919 | 1923 | |
1920 | 1924 | /* |
… |
… |
|
3221 | 3225 | } |
3222 | 3226 | |
3223 | 3227 | /* initial management hold, called early, before first context initialization */ |
3224 | | do_hold (); |
| 3228 | do_hold (c); |
3225 | 3229 | if (IS_SIG (c)) |
3226 | 3230 | { |
3227 | 3231 | msg (M_WARN, "Signal received from management interface, exiting"); |