Bug 28552 - Bind Account.ConnectionError/Details
Summary: Bind Account.ConnectionError/Details
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-qt (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on: 28536
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-15 08:09 UTC by Andre Moreira Magalhaes
Modified: 2010-06-16 07:24 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Andre Moreira Magalhaes 2010-06-15 08:09:43 UTC

    
Comment 1 Will Thompson 2010-06-15 11:01:55 UTC
Hmm.

This code:

+        if (changed) {
+            if (connectionStatus == ConnectionStatusConnected) {
+                connectionError = QString();
+                connectionErrorDetails.clear();
+            } else if (connectionError.isEmpty()) {
+                connectionError = ConnectionHelper::statusReasonToErrorName(
+                        connectionStatusReason, oldConnectionStatus);
+            }

depends on the ConnectionError always changing at the same time as the ConnectionStatus. If it changes just before the ConnectionStatus, then the error received will be ignored, and then the status will change and we don't know why.

I just read the MC source and I think it'll actually do the right thing here, so I'm not sure it's worth doing anything more elaborate. Maybe worth adding a debug() message if connectionError becomes non-empty but the status isn't Disconnected?

Otherwise looks good!
Comment 2 Andre Moreira Magalhaes 2010-06-16 07:05:51 UTC
(In reply to comment #1)
> Hmm.
> 
> This code:
> 
> +        if (changed) {
> +            if (connectionStatus == ConnectionStatusConnected) {
> +                connectionError = QString();
> +                connectionErrorDetails.clear();
> +            } else if (connectionError.isEmpty()) {
> +                connectionError = ConnectionHelper::statusReasonToErrorName(
> +                        connectionStatusReason, oldConnectionStatus);
> +            }
> 
> depends on the ConnectionError always changing at the same time as the
> ConnectionStatus. If it changes just before the ConnectionStatus, then the
> error received will be ignored, and then the status will change and we don't
> know why.
> 
> I just read the MC source and I think it'll actually do the right thing here,
> so I'm not sure it's worth doing anything more elaborate. Maybe worth adding a
> debug() message if connectionError becomes non-empty but the status isn't
> Disconnected?

Yep, I missed that, I think I managed to fix this. Updated the branch with the changes.
Comment 3 Will Thompson 2010-06-16 07:10:28 UTC
looks good!
Comment 4 Andre Moreira Magalhaes 2010-06-16 07:24:04 UTC
Merged upstream. It will be in next release 0.3.5


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.