Subversion Repositories DevTools

Rev

Rev 5172 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5172 Rev 5245
Line 53... Line 53...
53
    Call reportEvent
53
    Call reportEvent
54
ElseIf (parOpr = "remExecTest") Then
54
ElseIf (parOpr = "remExecTest") Then
55
    Call remExecTest
55
    Call remExecTest
56
ElseIf (parOpr = "pkgAccessTest") Then
56
ElseIf (parOpr = "pkgAccessTest") Then
57
    Call pkgAccessTest
57
    Call pkgAccessTest
-
 
58
ElseIf (parOpr = "lxrAccessTest") Then
-
 
59
    Call lxrAccessTest
58
 
60
 
59
Else
61
Else
60
    oJSON.data("emsgSummary") = "Unknown operation requested:" & parOpr
62
    oJSON.data("emsgSummary") = "Unknown operation requested:" & parOpr
61
End If
63
End If
62
 
64
 
Line 232... Line 234...
232
        result = 1
234
        result = 1
233
        oJSON.data("emsgSummary") = "Archive not responding"
235
        oJSON.data("emsgSummary") = "Archive not responding"
234
    End If
236
    End If
235
End Sub
237
End Sub
236
 
238
 
-
 
239
'-------------------------------------------------
-
 
240
' Function:    lxrAccessTest
-
 
241
' Description: Test dpkg_archive access - can we map it
-
 
242
'
-
 
243
Sub lxrAccessTest
-
 
244
 
-
 
245
    Dim oXMLHTTP
-
 
246
    Dim testUrl
-
 
247
    Dim testAccess
-
 
248
    testAccess = False
-
 
249
    testUrl = LXR_URL
-
 
250
    Set oXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.3.0")
-
 
251
 
-
 
252
    ' Use error handling in case dpkg_archive is not available
-
 
253
    ' Use HEAD to test existence
-
 
254
    Err.Clear
-
 
255
    On Error Resume Next
-
 
256
    oXMLHTTP.Open "HEAD", testUrl, False
-
 
257
    oXMLHTTP.Send
-
 
258
 
-
 
259
    ' Do not combine the next two If statments - it will not work
-
 
260
    If Err.Number = 0  Then
-
 
261
    If oXMLHTTP.Status = 200 Then 
-
 
262
        testAccess = True
-
 
263
    End If
-
 
264
    End If
-
 
265
    On Error Goto 0
-
 
266
 
-
 
267
    If testAccess Then
-
 
268
        result = 0
-
 
269
    Else
-
 
270
        result = 1
-
 
271
        oJSON.data("emsgSummary") = "LXR Server not responding"
-
 
272
    End If
-
 
273
End Sub
-
 
274
 
237
%>
275
%>