Bug 28552

Summary: Bind Account.ConnectionError/Details
Product: Telepathy Reporter: Andre Moreira Magalhaes <andrunko>
Component: tp-qtAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 28536    
Bug Blocks:    

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.