Red Hat Bugzilla – Bug 1253848
Function spice_session_connect reports as connected even if it is not pointing at an existing or valid server address
Last modified: 2015-08-21 08:35:47 EDT
Created attachment 1063172 [details]
Example code to prove issue with spice-glib
Description of problem:
Function spice_session_connect reports as connected even if it is not pointing at an existing or valid server address. The function _always_ returns true. I explicitly set the host property (to 127.0.0.1) and the port property (to 5900, then again to 66000) and it produced the same result.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Download sample code
2. Compile it
3. Run it
It "connects" to a server that can't possibly exist.
It should declare that it failed to connect.
Example code attached.
spice_session_connect() is async.
It returns false if the session state is invalid, but true simply means that it's ongoing. You must watch for channels state. I sent a patch:
doc updated upstream, thanks