)]}'
{"src/openvpn/forward.c":[{"author":{"_account_id":1000031,"name":"reynir","email":"reynir@reynir.dk","username":"reynir"},"change_message_id":"93a6b5fdf4825172950f79c3dc1b20397b207175","unresolved":true,"context_lines":[{"line_number":520,"context_line":"schedule_exit(struct context *c, const int n_seconds, const int signal)"},{"line_number":521,"context_line":"{"},{"line_number":522,"context_line":"    /* don\u0027t reschedule if already scheduled; we drop the new signal, but it"},{"line_number":523,"context_line":"     * only ever seems to be SIGTERM anyway. */"},{"line_number":524,"context_line":"    if (event_timeout_defined(\u0026c-\u003ec2.scheduled_exit)) {"},{"line_number":525,"context_line":"        return;"},{"line_number":526,"context_line":"    }"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"3395ca91_15f2e5ca","line":523,"updated":"2024-04-22 11:19:41.000000000","message":"I also considered dropping the `signal` argument as it is currently always `SIGTERM` at all call sites.","commit_id":"2fb60a8651262283fed79366eb4d53df5f769228"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"3350fb9669a06cf312c46d1af82530fefe308b72","unresolved":false,"context_lines":[{"line_number":520,"context_line":"schedule_exit(struct context *c, const int n_seconds, const int signal)"},{"line_number":521,"context_line":"{"},{"line_number":522,"context_line":"    /* don\u0027t reschedule if already scheduled; we drop the new signal, but it"},{"line_number":523,"context_line":"     * only ever seems to be SIGTERM anyway. */"},{"line_number":524,"context_line":"    if (event_timeout_defined(\u0026c-\u003ec2.scheduled_exit)) {"},{"line_number":525,"context_line":"        return;"},{"line_number":526,"context_line":"    }"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"090e8b75_da780d6c","line":523,"in_reply_to":"3395ca91_15f2e5ca","updated":"2024-04-24 12:13:13.000000000","message":"Done","commit_id":"2fb60a8651262283fed79366eb4d53df5f769228"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"ab4432fecbed78638083532e3ff9b10f9a0a39d4","unresolved":true,"context_lines":[{"line_number":522,"context_line":"    /* don\u0027t reschedule if already scheduled; we drop the new signal, but it"},{"line_number":523,"context_line":"     * only ever seems to be SIGTERM anyway. */"},{"line_number":524,"context_line":"    if (event_timeout_defined(\u0026c-\u003ec2.scheduled_exit)) {"},{"line_number":525,"context_line":"        return;"},{"line_number":526,"context_line":"    }"},{"line_number":527,"context_line":"    tls_set_single_session(c-\u003ec2.tls_multi);"},{"line_number":528,"context_line":"    update_time();"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"832e9f3f_055cb4bc","line":525,"updated":"2024-04-22 11:46:20.000000000","message":"You might want to consider changing the function to return a boolean to indicate whether it did anything. `send_auth_failure` already does the same check and could just use this one instead. And the other callers might also benefit from not doing other actions if exit is already scheduled.","commit_id":"2fb60a8651262283fed79366eb4d53df5f769228"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"3350fb9669a06cf312c46d1af82530fefe308b72","unresolved":false,"context_lines":[{"line_number":522,"context_line":"    /* don\u0027t reschedule if already scheduled; we drop the new signal, but it"},{"line_number":523,"context_line":"     * only ever seems to be SIGTERM anyway. */"},{"line_number":524,"context_line":"    if (event_timeout_defined(\u0026c-\u003ec2.scheduled_exit)) {"},{"line_number":525,"context_line":"        return;"},{"line_number":526,"context_line":"    }"},{"line_number":527,"context_line":"    tls_set_single_session(c-\u003ec2.tls_multi);"},{"line_number":528,"context_line":"    update_time();"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"01a64bab_9f4236b8","line":525,"in_reply_to":"832e9f3f_055cb4bc","updated":"2024-04-24 12:13:13.000000000","message":"Done","commit_id":"2fb60a8651262283fed79366eb4d53df5f769228"},{"author":{"_account_id":1000031,"name":"reynir","email":"reynir@reynir.dk","username":"reynir"},"change_message_id":"86273227cd3500d1217842f034aea27bc3da084d","unresolved":true,"context_lines":[{"line_number":526,"context_line":"    }"},{"line_number":527,"context_line":"    tls_set_single_session(c-\u003ec2.tls_multi);"},{"line_number":528,"context_line":"    update_time();"},{"line_number":529,"context_line":"    reset_coarse_timers(c);"},{"line_number":530,"context_line":"    event_timeout_init(\u0026c-\u003ec2.scheduled_exit, n_seconds, now);"},{"line_number":531,"context_line":"    c-\u003ec2.scheduled_exit_signal \u003d signal;"},{"line_number":532,"context_line":"    msg(D_SCHED_EXIT, \"Delayed exit in %d seconds\", n_seconds);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"b5a7a10b_17482a9e","line":529,"updated":"2024-04-22 11:14:15.000000000","message":"I am not sure what the above three function calls do and if we should still call them.","commit_id":"2fb60a8651262283fed79366eb4d53df5f769228"},{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"83f4ecf305fd13824fc7188d8c072d012b7f9b6c","unresolved":true,"context_lines":[{"line_number":526,"context_line":"    }"},{"line_number":527,"context_line":"    tls_set_single_session(c-\u003ec2.tls_multi);"},{"line_number":528,"context_line":"    update_time();"},{"line_number":529,"context_line":"    reset_coarse_timers(c);"},{"line_number":530,"context_line":"    event_timeout_init(\u0026c-\u003ec2.scheduled_exit, n_seconds, now);"},{"line_number":531,"context_line":"    c-\u003ec2.scheduled_exit_signal \u003d signal;"},{"line_number":532,"context_line":"    msg(D_SCHED_EXIT, \"Delayed exit in %d seconds\", n_seconds);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"e98ba825_8fe5fe4e","line":529,"in_reply_to":"b5a7a10b_17482a9e","updated":"2024-05-16 11:12:38.000000000","message":"reset_coarse_timers ensures that newly scheduled timer actually is taken into account. `update_time` updates now for that. And  tls_set_single_session in typical OpenVPN fashion ensure that no renegotion can happy by using a completely different feature of setting the session into a mode where no renegotiation can happen.","commit_id":"2fb60a8651262283fed79366eb4d53df5f769228"},{"author":{"_account_id":1000031,"name":"reynir","email":"reynir@reynir.dk","username":"reynir"},"change_message_id":"93a6b5fdf4825172950f79c3dc1b20397b207175","unresolved":true,"context_lines":[{"line_number":527,"context_line":"    tls_set_single_session(c-\u003ec2.tls_multi);"},{"line_number":528,"context_line":"    update_time();"},{"line_number":529,"context_line":"    reset_coarse_timers(c);"},{"line_number":530,"context_line":"    event_timeout_init(\u0026c-\u003ec2.scheduled_exit, n_seconds, now);"},{"line_number":531,"context_line":"    c-\u003ec2.scheduled_exit_signal \u003d signal;"},{"line_number":532,"context_line":"    msg(D_SCHED_EXIT, \"Delayed exit in %d seconds\", n_seconds);"},{"line_number":533,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"f2f84020_796d7125","line":530,"updated":"2024-04-22 11:19:41.000000000","message":"I have only now thought of it: what if the new `n_seconds` is sooner than the already scheduled exit?! I suspect `n_seconds` is always 5, though.","commit_id":"2fb60a8651262283fed79366eb4d53df5f769228"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"3350fb9669a06cf312c46d1af82530fefe308b72","unresolved":false,"context_lines":[{"line_number":527,"context_line":"    tls_set_single_session(c-\u003ec2.tls_multi);"},{"line_number":528,"context_line":"    update_time();"},{"line_number":529,"context_line":"    reset_coarse_timers(c);"},{"line_number":530,"context_line":"    event_timeout_init(\u0026c-\u003ec2.scheduled_exit, n_seconds, now);"},{"line_number":531,"context_line":"    c-\u003ec2.scheduled_exit_signal \u003d signal;"},{"line_number":532,"context_line":"    msg(D_SCHED_EXIT, \"Delayed exit in %d seconds\", n_seconds);"},{"line_number":533,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"123d7f7a_5b2bfd6a","line":530,"in_reply_to":"73f172e8_be13b424","updated":"2024-04-24 12:13:13.000000000","message":"Done","commit_id":"2fb60a8651262283fed79366eb4d53df5f769228"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"ab4432fecbed78638083532e3ff9b10f9a0a39d4","unresolved":true,"context_lines":[{"line_number":527,"context_line":"    tls_set_single_session(c-\u003ec2.tls_multi);"},{"line_number":528,"context_line":"    update_time();"},{"line_number":529,"context_line":"    reset_coarse_timers(c);"},{"line_number":530,"context_line":"    event_timeout_init(\u0026c-\u003ec2.scheduled_exit, n_seconds, now);"},{"line_number":531,"context_line":"    c-\u003ec2.scheduled_exit_signal \u003d signal;"},{"line_number":532,"context_line":"    msg(D_SCHED_EXIT, \"Delayed exit in %d seconds\", n_seconds);"},{"line_number":533,"context_line":"}"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"73f172e8_be13b424","line":530,"in_reply_to":"f2f84020_796d7125","updated":"2024-04-22 11:46:20.000000000","message":"It is always `c-\u003eoptions.scheduled_exit_interval` which is always 5 at the moment.","commit_id":"2fb60a8651262283fed79366eb4d53df5f769228"}]}
