Bug 1253848 - Function spice_session_connect reports as connected even if it is not pointing at an existing or valid server address
Function spice_session_connect reports as connected even if it is not pointin...
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: spice-gtk (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Marc-Andre Lureau
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-14 17:49 EDT by Tyler Cromwell
Modified: 2015-08-21 08:35 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-21 08:35:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Example code to prove issue with spice-glib (1.06 KB, application/x-xz)
2015-08-14 17:49 EDT, Tyler Cromwell
no flags Details

  None (edit)
Description Tyler Cromwell 2015-08-14 17:49:44 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):
spice-glib-0.29-1.fc22

How reproducible:
Always

Steps to Reproduce:
1. Download sample code
2. Compile it
3. Run it

Actual results:
It "connects" to a server that can't possibly exist.

Expected results:
It should declare that it failed to connect.

Additional info:
Example code attached.
Comment 1 Marc-Andre Lureau 2015-08-21 08:03:58 EDT
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:
http://lists.freedesktop.org/archives/spice-devel/2015-August/021674.html
Comment 2 Marc-Andre Lureau 2015-08-21 08:35:47 EDT
doc updated upstream, thanks

Note You need to log in before you can comment on or make changes to this bug.