openocd: fix issue in WIN32 with TCP adapters
[fw/openocd] / src / openocd.c
index 2a9a0b3d4a37ae7c764d4cf5968fd0887c1df61a..886228425d79c7dafac6ef7934be7796cbfbd3da 100644 (file)
@@ -345,6 +345,8 @@ int openocd_main(int argc, char *argv[])
        command_context_mode(cmd_ctx, COMMAND_CONFIG);
        command_set_output_handler(cmd_ctx, configuration_output_handler, NULL);
 
+       server_host_os_entry();
+
        /* Start the executable meat that can evolve into thread in future. */
        ret = openocd_thread(argc, argv, cmd_ctx);
 
@@ -360,6 +362,8 @@ int openocd_main(int argc, char *argv[])
 
        adapter_quit();
 
+       server_host_os_close();
+
        /* Shutdown commandline interface */
        command_exit(cmd_ctx);