Changeset 612


Ignore:
Timestamp:
01/16/10 00:18:05 (2 years ago)
Author:
octorian
Message:

Additional coverage-check logging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LogicMail/src/org/logicprobe/LogicMail/util/ConnectionBB42.java

    r611 r612  
    7373         
    7474        StreamConnection connection = null; 
    75         if((transports & TRANSPORT_WIFI) != 0 && srWiFi != null && coverageWiFi) { 
     75        if(((transports & TRANSPORT_WIFI) != 0) && srWiFi != null && coverageWiFi) { 
    7676            connection = attemptWiFi(urlBase); 
    7777        } 
    78         if(connection == null && (transports & TRANSPORT_DIRECT_TCP) != 0 && coverageTCP) { 
     78        if(connection == null && ((transports & TRANSPORT_DIRECT_TCP) != 0) && coverageTCP) { 
    7979            connection = attemptDirectTCP(urlBase); 
    8080        } 
    81         if(connection == null && (transports & TRANSPORT_MDS) != 0 && srMDS != null && coverageMDS) { 
     81        if(connection == null && ((transports & TRANSPORT_MDS) != 0) && srMDS != null && coverageMDS) { 
    8282            connection = attemptMDS(urlBase); 
    8383        } 
    84         if(connection == null && (transports & TRANSPORT_WAP2) != 0 && srWAP2 != null && coverageWAP2) { 
     84        if(connection == null && ((transports & TRANSPORT_WAP2) != 0) && srWAP2 != null && coverageWAP2) { 
    8585            connection = attemptWAP2(urlBase); 
    8686        } 
     
    116116                    srWAP2 = myRecord; 
    117117                } 
    118             }    
     118            } 
    119119        } 
    120120         
    121121        initializeCoverage(); 
     122         
     123        if (EventLogger.getMinimumLevel() >= EventLogger.DEBUG_INFO) { 
     124            StringBuffer buf = new StringBuffer(); 
     125            buf.append("Availability: "); 
     126            buf.append("MDS="); buf.append(srMDS != null); 
     127            buf.append(", WAP2="); buf.append(srWAP2 != null); 
     128            buf.append(", WiFi="); buf.append(srWiFi != null); 
     129            buf.append("\r\n"); 
     130            buf.append("Coverage: "); 
     131            buf.append("TCP="); buf.append(coverageTCP); 
     132            buf.append(", MDS="); buf.append(coverageMDS); 
     133            buf.append(", WAP2="); buf.append(coverageWAP2); 
     134            buf.append(", WiFi="); buf.append(coverageWiFi); 
     135            EventLogger.logEvent(AppInfo.GUID, buf.toString().getBytes(), 
     136                    EventLogger.DEBUG_INFO); 
     137        } 
    122138    } 
    123139 
Note: See TracChangeset for help on using the changeset viewer.