Changeset 566 for branches


Ignore:
Timestamp:
Mar 6, 2011, 11:48:47 AM (15 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: EVFSGUI 2.1: Attempt to finally fix the wrong workgroup issue

Location:
branches/guitools-2.0
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/guitools-2.0/evfsgui/evfsgui.VRP

    r558 r566  
    1010VRXWindow: __VREFileListWindow,1,807,11033,1590,3358
    1111VRXWindow: __VRESectionListWindow,1,2674,10648,8696,4794
    12 VRXWindow: __VREToolsWindow,1,2517,7082,6483,1663
     12VRXWindow: __VREToolsWindow,1,2517,7082,648
    1313VRXWindow: __VREWindListWindow,1,542,8721,2650,3150
    1414UserFile: 1
    1515UserWindow: Main,1
    16 UserWindow: SW_ADVANCED,1
    17 UserWindow: SW_LOGIN,1
    18 UserWindow: SW_MOUNTPOINT,1
     16UserWindow: SW_INFO,1
  • branches/guitools-2.0/evfsgui/evfsgui.VRX

    r558 r566  
    14411441    end
    14421442    if Foundserver = 0 then do
     1443
    14431444        machine = VRGet("EF_SERVER","value")
    14441445        smbtree.!machine = VRMethod( "CN_SMBTREE", "AddRecord",,, machine)
     
    14491450        call _UserCredUpdate
    14501451        call _RefreshShares
     1452
     1453
     1454
     1455
     1456
     1457
    14511458    end
    14521459return
  • branches/guitools-2.0/shared/smbtree.vrs

    r558 r566  
    232232        stat = stream(smbmachine.I,'c','open read')
    233233        if stat = "READY:" then do /* we found a readable output file */
     234
    234235            /* Machine = VRParseFilename(smbmachine.I,'E') */
    235236            Machine = substr(smbmachine.I,pos('.',smbmachine.I)+1)
     
    303304            end
    304305            line = linein(smbmachine.I)
    305             /* Reading workgroup and master - eventually both empty */
     306            /* Reading workgroup and master - eventually both empty */
    306307            line = linein(smbmachine.I)
     308
     309
     310
     311
     312
     313
    307314            parse var line '09'x workgroup master
    308315            master = strip(master)
    309316
    310             /* we use this to set the workgroup for manually added servers */
    311             if workgroup <> "" then do
     317            /* we use this to set the workgroup for manually added servers */
     318            if workgroup <> "" then do
    312319                wgh = _GetMachinehandle(workgroup)
    313                 if wgh = "" then do /* This machine appears to be in a new workgroup - add it as well */
     320                if wgh = "" then do /* The machine appears to be in a new workgroup - add it as well */
     321                    /* NOTE: This should be obsolete now because the list of available
     322                       workgroups should always have been updated before we get here */
    314323                    wgh = VRMethod( "CN_smbtree", "AddRecord",,, workgroup,"#62:PMWP.DLL")
    315324                    ok = VRMethod( "CN_smbtree", "SetFieldData", wgh, WorkGroupFH, workgroup)
     
    319328                end
    320329                /* we only do this for machines with empty parent (=workgroup) handle */
    321                 /* this might not be good enough yet - verifictaion required          */
     330                /* IF there is only one workgroup */
     331                if wgh <> "" & VRMethod('CN_smbtree', 'GetRecordAttr', smbtree.!machine, 'Parent') = "" then do
     332                    ok = VRMethod('CN_smbtree', 'SetRecordAttr', smbtree.!machine, 'Parent', wgh)
     333                end
     334            end
     335            else do /* There are multiple workgroups, we need additional */
     336                    /* measures tofind out which is our workgroup */
     337                say     '  'samba.!smbclientexe' -L "'Machine'" -N 'debuglevel' 2>'samba.!msg' 1>NUL'
     338                address cmd samba.!smbclientexe' -L "'Machine'" -N 'debuglevel' 2>'samba.!msg' 1>NUL'
     339                infoline = linein(samba.!msg)
     340                if word(infoline,1) = "creating" then do /* upcase tables are missing */
     341                    say "Missing upcase tables detected!"
     342                    infoline = linein(samba.!msg)
     343                    infoline = linein(samba.!msg)
     344                end
     345                IF options.!debug == 1 THEN say '  Response = "'Infoline'"'
     346                ok = stream(samba.!msg,'c','close')
     347                ok = SysFileDelete(samba.!msg)
     348
     349                parse var infoline "Domain=["WorkGroup"] "Rest
     350                wgh = _GetMachinehandle(workgroup)
    322351                if wgh <> "" & VRMethod('CN_smbtree', 'GetRecordAttr', smbtree.!machine, 'Parent') = "" then do
    323352                    ok = VRMethod('CN_smbtree', 'SetRecordAttr', smbtree.!machine, 'Parent', wgh)
     
    360389    if match = 0 then rh.I = "" /* return an empty handle, if there was no match */
    361390return rh.I
     391
     392
     393
     394
     395
     396
     397
     398
     399
     400
     401
     402
     403
     404
     405
     406
     407
     408
     409
     410
     411
     412
     413
     414
     415
     416
     417
     418
     419
     420
     421
     422
     423
     424
     425
     426
     427
     428
     429
     430
     431
     432
     433
Note: See TracChangeset for help on using the changeset viewer.