Bug 1253848 - Function spice_session_connect reports as connected even if it is not pointing at an existing or valid server address
Summary: Function spice_session_connect reports as connected even if it is not pointin...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: spice-gtk
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Marc-Andre Lureau
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-14 21:49 UTC by Tyler Cromwell
Modified: 2015-08-21 12:35 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-08-21 12:35:47 UTC
Type: Bug
Embargoed:


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

Description Tyler Cromwell 2015-08-14 21:49:44 UTC
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 12:03:58 UTC
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 12:35:47 UTC
doc updated upstream, thanks


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