Ignore:
Timestamp:
Feb 7, 2012, 9:30:41 AM (14 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: Updates in EVFSGUI, SMBMON and SSCC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/shared/smbtree.vrs

    r660 r688  
    55    say time()' _RefreshTree() started'
    66    FirstRun = 0
    7 
     7    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", "Refreshing network")
    88    ok = SysFileDelete(samba.!msg)
    99
     
    3636
    3737    stat = stream(samba.!serverlist,'c','open read')
    38     if stat <> "READY:" then return
     38    if stat <> "READY:" then do
     39        if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')
     40        return
     41    end
    3942
    4043    if UserCred = 'USERCRED' | UserCred = '' | UserCred = '--user=%' then UserCred = '-N'
     
    392395    if BroadCast = 1 then BroadCast = '-b'; else BroadCast = ''
    393396
    394     say     '  'samba.!smbtreeexe' 'BroadCast' -D 'debuglevel' 'UserCred' >'samba.!msg
    395     address cmd samba.!smbtreeexe' 'BroadCast' -D 'debuglevel' 'UserCred' >'samba.!msg
     397    call VRSet VRWindow(), 'Pointer', 'Wait'
     398    say       '  detach 'samba.!smbtreeexe' 'BroadCast' -D 'debuglevel' 'UserCred' >'samba.!msg
     399    address cmd 'detach 'samba.!smbtreeexe' 'BroadCast' -D 'debuglevel' 'UserCred' >'samba.!msg
     400
     401    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Enumerating workgroups")
     402    do while stream(samba.!msg,'c','open read') <> "READY:"
     403        ok = SysSleep(1)
     404        if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')
     405    end
     406    call VRSet VRWindow(), 'Pointer', '<default>'
    396407
    397408    if BroadCast = '-b' then BroadCast = 1; else BroadCast = 0
     
    445456    /* Get all IP addresses of the machine */
    446457    machine = arg(1)
    447     say     '  'samba.!nmblookupexe' 'machine' 'debuglevel' >'samba.!msg
    448     address cmd samba.!nmblookupexe' 'machine' 'debuglevel' >'samba.!msg
     458    call VRSet VRWindow(), 'Pointer', 'Wait'
     459    say       '  detach 'samba.!nmblookupexe' 'machine' 'debuglevel' >'samba.!msg
     460    address cmd 'detach 'samba.!nmblookupexe' 'machine' 'debuglevel' >'samba.!msg
     461
     462    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Obtaining IP from "machine)
     463    do while stream(samba.!msg,'c','open read') <> "READY:"
     464        ok = SysSleep(0.33)
     465        if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')
     466    end
     467    call VRSet VRWindow(), 'Pointer', '<default>'
     468
    449469    ok = file2stem(samba.!msg,"nmblookup.")
    450470    ipstr = ""; ip = ""
     
    461481_GetMachineMACRoles: procedure expose debuglevel samba.
    462482    machine = arg(1) /* May be name or IP */
    463     say     '  'samba.!nmblookupexe' -A 'machine' 'debuglevel' >'samba.!msg
    464     address cmd samba.!nmblookupexe' -A 'machine' 'debuglevel' >'samba.!msg
     483    call VRSet VRWindow(), 'Pointer', 'Wait'
     484    say       '  detach 'samba.!nmblookupexe' -A 'machine' 'debuglevel' >'samba.!msg
     485    address cmd 'detach 'samba.!nmblookupexe' -A 'machine' 'debuglevel' >'samba.!msg
     486
     487    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Obtaining capabilities from "machine)
     488    do while stream(samba.!msg,'c','open read') <> "READY:"
     489        ok = SysSleep(0.33)
     490        if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')
     491    end
     492    call VRSet VRWindow(), 'Pointer', '<default>'
    465493    ok = file2stem(samba.!msg,"nmblookup.")
    466494    Roles = ""
     
    486514_GetMachineNMBStatus: procedure expose debuglevel samba.
    487515    machine = arg(1) /* name only allowed */
    488     say     '  'samba.!nmblookupexe' -S 'machine' 'debuglevel' >'samba.!msg
    489     address cmd samba.!nmblookupexe' -S 'machine' 'debuglevel' >'samba.!msg
     516    call VRSet VRWindow(), 'Pointer', 'Wait'
     517    say       '  detach 'samba.!nmblookupexe' -S 'machine' 'debuglevel' >'samba.!msg
     518    address cmd 'detach 'samba.!nmblookupexe' -S 'machine' 'debuglevel' >'samba.!msg
     519
     520    if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption","Querying "machine" for roles")
     521    do while stream(samba.!msg,'c','open read') <> "READY:"
     522        ok = SysSleep(0.33)
     523        if VRIsValidObject("DT_STATUSBAR") then ok = VRSet("DT_STATUSBAR","Caption", VRGet("DT_STATUSBAR","Caption")||'.')
     524    end
     525    call VRSet VRWindow(), 'Pointer', '<default>'
     526
    490527    ok = file2stem(samba.!msg,"nmblookup.")
    491528    IPStr = ""
Note: See TracChangeset for help on using the changeset viewer.