monitor_is_remote reports 0/false when remote monitor is not completely closed
Versatile Commodore Emulator
Brought to you by:
blackystardust,
gpz
related to https://sourceforge.net/p/vice-emu/patches/123/ ... this patch only masks the actual problem in GTK instead of fixing it for all emulators
https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/monitor/monitor.c#l2510 monitor_close() already checks https://sourceforge.net/p/vice-emu/code/HEAD/tree/trunk/vice/src/monitor/monitor_network.c#l556 monitor_is_remote() before calling uimon_window_close(). however, it is already set to 0 before that function is called.
My patch indeed only hides a deeper problem, sorry about that.
Looking at monitor_network.c, shouldn't
monitor_is_remote()
checklisten_socket
rather thanconnected_socket
?listen_socket
gets initialized inmonitor_network_activate()
and gets set to NULL inmonitor_network_deactivate()
. So unless I'm missing something,listen_socket
seems to indicate whether VICE is in remote monitor state.Look at
monitor_network_data_available()
.listen_socket
waits for you to attempt to connect to the monitor. It is openned when the remote monitor resource is enabled.Yes, so shouldn't monitor_is_remote() be changed to:
Seems to be that as long as VICE is listening for remote monitor commands/sessions, any monitor session is therefor remote.
Last edit: compyx 2016-07-05
No. That socket listens for requests to make a connection. It doesn't listen for remote commands. It always is open if the "Remote monitor" feature is enabled (by a resource that's controlled by a User Interface -- or a command line). If
monitor_is_remote()
looked atlisten_socket
, then we couldn't open a monitor window locally, while we aren't connected remotely. I want to be able to do that (although, it doesn't work well in WinVICE, at this time).Opening a local monitor while VICE is listening for remote connections doesn't work at all on Linux with Gtk3. Which is what I based my assumption on: that there either is a remote or a local monitor, but not both.
If you want to have both, which I would like too, by the way, then my
listen_socket
suggestion is clearly wrong.Is this still a problem?
You still cannot have both a text and/or binary connection in combination with the GUI monitor. You can have both network connections together though.
If all clients disconnect then I believe you can reopen the GUI monitor, which will then prevent the network connections from being opened.
Edit: The GUI monitor will also reopen on any breakpoints that are still set.
Last edit: Empathic Qubit 2021-11-27