[Spice-devel] [PATCH] spice client: simplify link_err reporting

Uri Lublin uril at redhat.com
Thu Feb 10 23:50:05 PST 2011


---
 client/red_channel.cpp |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/client/red_channel.cpp b/client/red_channel.cpp
index f4cdf52..0d95f3a 100644
--- a/client/red_channel.cpp
+++ b/client/red_channel.cpp
@@ -195,9 +195,7 @@ void RedChannelBase::link(uint32_t connection_id, const std::string& password,

     recive((uint8_t*)&link_res, sizeof(link_res));
     if (link_res != SPICE_LINK_ERR_OK) {
-        int error_code = (link_res == SPICE_LINK_ERR_PERMISSION_DENIED) ?
-                                SPICEC_ERROR_CODE_CONNECT_FAILED : SPICEC_ERROR_CODE_CONNECT_FAILED;
-        THROW_ERR(error_code, "connect failed %u", link_res);
+        THROW_ERR(SPICEC_ERROR_CODE_CONNECT_FAILED, "connect failed %u", link_res);
     }
 }

-- 
1.7.4



More information about the Spice-devel mailing list