)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000009,"name":"Selva Nair","display_name":"Selva Nair","email":"selva.nair@gmail.com","username":"selvanair"},"change_message_id":"9daa95d396f5e70f54788ebd5a977ec2969c81ed","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"28d2dc5f_52ee56dc","updated":"2025-04-24 15:09:52.000000000","message":"Lightly tested on Win 10.","commit_id":"ff6961bdf2db7d6947f13e62fb3b1d804030bc7b"}],"src/openvpn/tun.c":[{"author":{"_account_id":1000009,"name":"Selva Nair","display_name":"Selva Nair","email":"selva.nair@gmail.com","username":"selvanair"},"change_message_id":"904dff3f91b309d62be0770ee72f15a9126c40f4","unresolved":true,"context_lines":[{"line_number":3778,"context_line":"    }"},{"line_number":3779,"context_line":"}"},{"line_number":3780,"context_line":""},{"line_number":3781,"context_line":"static struct device_instance_id_interface *"},{"line_number":3782,"context_line":"get_device_instance_id_interface(struct gc_arena *gc)"},{"line_number":3783,"context_line":"{"},{"line_number":3784,"context_line":"    HDEVINFO dev_info_set;"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"cb1bafd2_52f5f731","line":3781,"updated":"2025-04-23 22:25:52.000000000","message":"This change is not required nor advisable. Same with panel_reg and tap_reg below.\nInstead define them as const where used -- see below.","commit_id":"d32d686e4fbfaf31de3a35eaf51b32e80dfb68de"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"d95c90e1cda092167552e3041caf11fa9eb76762","unresolved":false,"context_lines":[{"line_number":3778,"context_line":"    }"},{"line_number":3779,"context_line":"}"},{"line_number":3780,"context_line":""},{"line_number":3781,"context_line":"static struct device_instance_id_interface *"},{"line_number":3782,"context_line":"get_device_instance_id_interface(struct gc_arena *gc)"},{"line_number":3783,"context_line":"{"},{"line_number":3784,"context_line":"    HDEVINFO dev_info_set;"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"e2801d99_1753f1ba","line":3781,"in_reply_to":"cb1bafd2_52f5f731","updated":"2025-04-24 06:58:36.000000000","message":"Acknowledged","commit_id":"d32d686e4fbfaf31de3a35eaf51b32e80dfb68de"},{"author":{"_account_id":1000009,"name":"Selva Nair","display_name":"Selva Nair","email":"selva.nair@gmail.com","username":"selvanair"},"change_message_id":"904dff3f91b309d62be0770ee72f15a9126c40f4","unresolved":true,"context_lines":[{"line_number":6653,"context_line":"{"},{"line_number":6654,"context_line":"    struct tap_reg *tap_reg \u003d get_tap_reg(gc);"},{"line_number":6655,"context_line":"    struct panel_reg *panel_reg \u003d get_panel_reg(gc);"},{"line_number":6656,"context_line":"    struct device_instance_id_interface *device_instance_id_interface \u003d get_device_instance_id_interface(gc);"},{"line_number":6657,"context_line":""},{"line_number":6658,"context_line":"    uint8_t actual_buffer[256];"},{"line_number":6659,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":2,"id":"d1ebab33_cae54f35","line":6656,"updated":"2025-04-23 22:25:52.000000000","message":"Define these three as \"const struct ...\". One can still re-assign them as required below.","commit_id":"d32d686e4fbfaf31de3a35eaf51b32e80dfb68de"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"8074403dc13562ea3377700b83a56d141ffe00b7","unresolved":false,"context_lines":[{"line_number":6653,"context_line":"{"},{"line_number":6654,"context_line":"    struct tap_reg *tap_reg \u003d get_tap_reg(gc);"},{"line_number":6655,"context_line":"    struct panel_reg *panel_reg \u003d get_panel_reg(gc);"},{"line_number":6656,"context_line":"    struct device_instance_id_interface *device_instance_id_interface \u003d get_device_instance_id_interface(gc);"},{"line_number":6657,"context_line":""},{"line_number":6658,"context_line":"    uint8_t actual_buffer[256];"},{"line_number":6659,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":2,"id":"4f2d37c4_06eedd41","line":6656,"in_reply_to":"78901121_07cb7bb3","updated":"2025-04-24 06:58:46.000000000","message":"Acknowledged","commit_id":"d32d686e4fbfaf31de3a35eaf51b32e80dfb68de"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"d95c90e1cda092167552e3041caf11fa9eb76762","unresolved":true,"context_lines":[{"line_number":6653,"context_line":"{"},{"line_number":6654,"context_line":"    struct tap_reg *tap_reg \u003d get_tap_reg(gc);"},{"line_number":6655,"context_line":"    struct panel_reg *panel_reg \u003d get_panel_reg(gc);"},{"line_number":6656,"context_line":"    struct device_instance_id_interface *device_instance_id_interface \u003d get_device_instance_id_interface(gc);"},{"line_number":6657,"context_line":""},{"line_number":6658,"context_line":"    uint8_t actual_buffer[256];"},{"line_number":6659,"context_line":""}],"source_content_type":"text/x-csrc","patch_set":2,"id":"78901121_07cb7bb3","line":6656,"in_reply_to":"d1ebab33_cae54f35","updated":"2025-04-24 06:58:36.000000000","message":"right, the data is const, but not the pointer.","commit_id":"d32d686e4fbfaf31de3a35eaf51b32e80dfb68de"},{"author":{"_account_id":1000009,"name":"Selva Nair","display_name":"Selva Nair","email":"selva.nair@gmail.com","username":"selvanair"},"change_message_id":"904dff3f91b309d62be0770ee72f15a9126c40f4","unresolved":true,"context_lines":[{"line_number":6704,"context_line":"            {"},{"line_number":6705,"context_line":"                HANDLE h \u003d tt-\u003eoptions.msg_channel;"},{"line_number":6706,"context_line":"                /* try to create an adapter once if we have a service pipe handle */"},{"line_number":6707,"context_line":"                if (adapter_created || (h \u0026\u0026 !do_create_adapter_service(h, tt-\u003ebackend_driver)))"},{"line_number":6708,"context_line":"                {"},{"line_number":6709,"context_line":"                    msg(M_FATAL, \"All %s adapters on this system are currently in use or disabled.\", print_tun_backend_driver(tt-\u003ebackend_driver));"},{"line_number":6710,"context_line":"                }"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"ebac2853_5ed7005b","line":6707,"updated":"2025-04-23 22:25:52.000000000","message":"I think we need not limit this using the adapter_created flag. There is a kind of \"race condition\" where the created adapter may get opened by another openvpn.exe process before this one gets a chance to open it. Especially so with service created instances which all startup together.\n\nIn such cases it should be okay to create a new one again in the next round of this while loop. That will work transparently if adapter_created is not set and checked. If some protection against a run-away loop is needed, we could keep it as a number instead of as a bool -- like, do not create \u003e 10 adapters in a run!","commit_id":"d32d686e4fbfaf31de3a35eaf51b32e80dfb68de"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"8074403dc13562ea3377700b83a56d141ffe00b7","unresolved":false,"context_lines":[{"line_number":6704,"context_line":"            {"},{"line_number":6705,"context_line":"                HANDLE h \u003d tt-\u003eoptions.msg_channel;"},{"line_number":6706,"context_line":"                /* try to create an adapter once if we have a service pipe handle */"},{"line_number":6707,"context_line":"                if (adapter_created || (h \u0026\u0026 !do_create_adapter_service(h, tt-\u003ebackend_driver)))"},{"line_number":6708,"context_line":"                {"},{"line_number":6709,"context_line":"                    msg(M_FATAL, \"All %s adapters on this system are currently in use or disabled.\", print_tun_backend_driver(tt-\u003ebackend_driver));"},{"line_number":6710,"context_line":"                }"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"9ce6ddd6_a5306ffa","line":6707,"in_reply_to":"ebac2853_5ed7005b","updated":"2025-04-24 06:58:46.000000000","message":"Acknowledged","commit_id":"d32d686e4fbfaf31de3a35eaf51b32e80dfb68de"},{"author":{"_account_id":1000009,"name":"Selva Nair","display_name":"Selva Nair","email":"selva.nair@gmail.com","username":"selvanair"},"change_message_id":"904dff3f91b309d62be0770ee72f15a9126c40f4","unresolved":true,"context_lines":[{"line_number":6728,"context_line":"                goto next;"},{"line_number":6729,"context_line":"            }"},{"line_number":6730,"context_line":""},{"line_number":6731,"context_line":"            if (tun_try_open_device(tt, *device_guid, device_instance_id_interface))"},{"line_number":6732,"context_line":"            {"},{"line_number":6733,"context_line":"                break;"},{"line_number":6734,"context_line":"            }"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"7ae3b2cb_836cd3b3","line":6731,"updated":"2025-04-23 22:25:52.000000000","message":"I think we should not limit this using the adapter_created flag here. There is a kind of \"race condition\" where the created adapter may get opened by another openvpn.exe process before this one gets a chance to open it. Especially so with service created instances which all startup together.\n\nIn such cases it should be okay to create again inn the second round which will work transparently if adapter_created is not set and checked. If some protectin against a run-away loop is needed, we could keep it as a number instead of as a bool -- like, do not create \u003e 10 adapters!","commit_id":"d32d686e4fbfaf31de3a35eaf51b32e80dfb68de"},{"author":{"_account_id":1000008,"name":"Lev Stipakov","display_name":"Lev Stipakov","email":"lstipakov@gmail.com","username":"stipa"},"change_message_id":"d95c90e1cda092167552e3041caf11fa9eb76762","unresolved":false,"context_lines":[{"line_number":6728,"context_line":"                goto next;"},{"line_number":6729,"context_line":"            }"},{"line_number":6730,"context_line":""},{"line_number":6731,"context_line":"            if (tun_try_open_device(tt, *device_guid, device_instance_id_interface))"},{"line_number":6732,"context_line":"            {"},{"line_number":6733,"context_line":"                break;"},{"line_number":6734,"context_line":"            }"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"36c92149_f13d12e9","line":6731,"in_reply_to":"7ae3b2cb_836cd3b3","updated":"2025-04-24 06:58:36.000000000","message":"Acknowledged","commit_id":"d32d686e4fbfaf31de3a35eaf51b32e80dfb68de"},{"author":{"_account_id":1000009,"name":"Selva Nair","display_name":"Selva Nair","email":"selva.nair@gmail.com","username":"selvanair"},"change_message_id":"9daa95d396f5e70f54788ebd5a977ec2969c81ed","unresolved":false,"context_lines":[{"line_number":6728,"context_line":"                goto next;"},{"line_number":6729,"context_line":"            }"},{"line_number":6730,"context_line":""},{"line_number":6731,"context_line":"            if (tun_try_open_device(tt, *device_guid, device_instance_id_interface))"},{"line_number":6732,"context_line":"            {"},{"line_number":6733,"context_line":"                break;"},{"line_number":6734,"context_line":"            }"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"958666f9_30bda351","line":6731,"in_reply_to":"7ae3b2cb_836cd3b3","updated":"2025-04-24 15:09:52.000000000","message":"This comment got duplicated.","commit_id":"d32d686e4fbfaf31de3a35eaf51b32e80dfb68de"}]}
