Changeset 875 for trunk/guitools/smbmon


Ignore:
Timestamp:
Mar 4, 2015, 10:28:25 AM (10 years ago)
Author:
Herwig Bauernfeind
Message:

GUITools: SSCC (Ticket #248), SMBMon (TDB Check page), EVFSGUI, shared library updates

Location:
trunk/guitools/smbmon
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/guitools/smbmon/rc/lang/smbmon_de.mkm

    r805 r875  
    2525SMM0020I: Produktinformation
    2626SMM0021I: Die Leute hinter Samba Server fr eComStation (OS/2)
    27 SMM0022?:
     27SMM0022I: TDB Dateien prfen
    2828SMM0023?:
    2929SMM0024I: Einstellungen
  • trunk/guitools/smbmon/rc/lang/smbmon_en.mkm

    r805 r875  
    2525SMM0020I: About
    2626SMM0021I: Samba Server for eComStation is brought to you by
    27 SMM0022I:
     27SMM0022I: Check TDB files
    2828SMM0023I:
    2929SMM0024I: Settings
  • trunk/guitools/smbmon/rc/lang/smbmon_es.mkm

    r805 r875  
    2525SMM0020I: Acerca de
    2626SMM0021I: Servidor Samba para eComStation proporcionado por
    27 SMM0022I:
     27SMM0022I: Comprobar los archivos TDB
    2828SMM0023I:
    2929SMM0024I: Preferencias
  • trunk/guitools/smbmon/rc/lang/smbmon_fr.mkm

    r805 r875  
    2727SMM0020I: · propos de
    2828SMM0021I: Serveur Samba pour eComStation vous est propos‚ par
    29 SMM0022I:
     29SMM0022I: V‚rifier fichiers TDB
    3030SMM0023I:
    3131SMM0024I: ParamŠtres
  • trunk/guitools/smbmon/rc/lang/smbmon_sv.mkm

    r805 r875  
    2323SMM0018I: ™vervakare
    2424SMM0019I: N„tverket
    25 SMM0020I:
    26 SMM0021?:
    27 SMM0022?:
     25SMM0020I: Om
     26SMM0021I: Samba Server f”r eComStation kommer fran
     27SMM0022I: Kontrollera TDB filer
    2828SMM0023?:
    2929SMM0024I: Inst„llningar
  • trunk/guitools/smbmon/smbmon.rc

    r805 r875  
    11icon   1 .\rc\icons\smbmon.ico
    2 bitmap 2 .\rc\icons\netlabs.bmp
     2bitmap 2 .\rc\icons\bww_bw.bmp
    33icon 40 .\rc\icons\start_samba2.ico
    44icon 41 .\rc\icons\samba_stop2.ico
     
    1111icon 48 .\rc\icons\pid.ico
    1212icon 49 .\rc\icons\zombie.ico
     13icon 50 .\rc\icons\tag.ico
     14icon 51 .\rc\icons\err.ico
    1315BITMAP 111 .\rc\throbber\eBall_01.bmp
    1416BITMAP 112 .\rc\throbber\eBall_02.bmp
  • trunk/guitools/smbmon/smbmon.vrp

    r869 r875  
    88VRXWindow: __VREMainWindow,1,2180,3614,1024,6769
    99VRXWindow: __VRESectionListWindow,1,4083,11226,7372,6589
    10 VRXWindow: __VREToolsWindow,1,2156,1494,5468,1669
    11 VRXWindow: __VREWindListWindow,1,964,11708,3132,3150
     10VRXWindow: __VREToolsWindow,1,2156,1494,5477,1663
     11VRXWindow: __VREWindListWindow,1,964,11708,5372,3150
    1212UserFile: 1
    1313UserWindow: Main,1
     14UserWindow: SW_FILES,1
     15UserWindow: SW_CHKTDB,1
  • trunk/guitools/smbmon/smbmon.vrx

    r869 r875  
    9797*/
    9898return
     99/*:VRX         _ChkTDB
     100*/
     101_ChkTDB:
     102
     103ok = SysFileTree(etc'\samba\lock\*.TDB',tdb.,'FO')
     104say etc'\samba\lock\*.TDB  'tdb.0
     105
     106error = 0
     107ok = VRMethod("CN_CHKTDB", "RemoveRecord", "ALL")
     108
     109do I = 1 to tdb.0
     110    RecHandle = VRMethod("CN_CHKTDB", "Addrecord")
     111    TDBFile =left(filespec('N',tdb.I), 22)
     112    ok = VRMethod("CN_CHKTDB", "SetFieldData", RecHandle, ChkTDBFilesFH, TDBFile, ChkTDBIconFH, "$50" )
     113    address cmd '@tdbtool 'tdb.I' check 2>'tdb.I'.err 1>'tdb.I'.out'
     114    out = linein(tdb.I'.out')
     115    ok = stream(tdb.I'.out','c','close')
     116    say out
     117    if pos('integrity is OK',out) > 0 then do /* integrity is ok */
     118        ok = SysFileDelete(tdb.I'.err')
     119        ok = SysFileDelete(tdb.I'.out')
     120        out = left(out,length(out)-1)
     121        TDBRecords = substr(out, pos("and has", out) + 7,)
     122        ok = VRMethod("CN_CHKTDB", "SetFieldData", RecHandle, ChkTDBStatusFH, TDBRecords )
     123
     124        address cmd '@tdbbackup -s.bak 'tdb.I' 2>NUL 1>NUL'
     125    end
     126    else do /* tdb error */
     127        ok = VRMethod("CN_CHKTDB", "SetFieldData", RecHandle, ChkTDBIconFH, "$51" )
     128        error = 1
     129        count = 0
     130        out = ""
     131        do while lines(tdb.I'.err') > 0 & count < 5
     132            errline = linein(tdb.I'.err')
     133            select
     134                /* skip unnecessary lines of log */
     135                when pos("bww ",errline) > 0 then iterate
     136                when pos("fcntl",errline) > 0 then iterate
     137                otherwise do
     138                    out = out||errline'. '
     139                    count = count + 1
     140                end
     141            end
     142        end
     143        ok = VRMethod("CN_CHKTDB", "SetFieldData", RecHandle, ChkTDBStatusFH, out )
     144        ok = stream(tdb.I'.err','c','close')
     145    end
     146
     147/*
     148    call charout , left(filespec('N',tdb.I), 22)
     149    address cmd '@tdbtool 'tdb.I' check 2>'tdb.I'.err 1>'tdb.I'.out'
     150    out = linein(tdb.I'.out')
     151    ok = stream(tdb.I'.out','c','close')
     152    say out
     153    if pos('integrity is OK',out) = 0 then do
     154        call beep 880, 20
     155        address cmd '@tdbbackup -s.bak -v 'tdb.I' 2>NUL 1>NUL'
     156        error = 1
     157        count = 0
     158        do while lines(tdb.I'.err') > 0 & count < 5
     159            errline = linein(tdb.I'.err')
     160            select
     161                /* skip unnecessary lines of log */
     162                when pos("bww ",errline) > 0 then iterate
     163                when pos("fcntl",errline) > 0 then iterate
     164                otherwise do
     165                    say right(copies(' ',22)'Cause: 'errline'!',min(length(errline)+22,79))
     166                    count = count + 1
     167                end
     168            end
     169        end
     170        ok = stream(tdb.I'.err','c','close')
     171    end
     172    else do
     173        ok = SysFileDelete(tdb.I'.err')
     174        ok = SysFileDelete(tdb.I'.out')
     175        address cmd '@tdbbackup -s.bak 'tdb.I' 2>NUL 1>NUL'
     176    end */
     177end
     178
     179return
     180
    99181/*:VRX         _ColumnShow
    100182*/
     
    165247    DStatusFH  = VRMethod( "CN_Daemons", "AddField", "String", NLVGetMessage(146) )
    166248    DPidsFH    = VRMethod( "CN_Daemons", "AddField", "String", NLVGetMessage(130) )
     249
     250    /* chktdb */
     251    ChkTDBFilesFH = VRMethod( "CN_CHKTDB", "AddField", "String", NLVGetMessage(134) )
     252    ChkTDBIconFH  = VRMethod( "CN_CHKTDB", "AddField", "Icon",   NLVGetMessage(146) )
     253    ChkTDBStatusFH= VRMethod( "CN_CHKTDB", "AddField", "String", NLVGetMessage(151) )
    167254
    168255    /* Browse tree */
     
    11621249    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(17)" ")
    11631250
     1251    w = VRLoad( "TDL_1", VRWindowPath(), "SW_CHKTDB" )
     1252    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(22)" ")
     1253
    11641254    w = VRLoad( "TDL_1", VRWindowPath(), "SW_SETTINGS" )
    11651255    ok = VRMethod( "TDL_1", "InsertPage", w,"+ "NLVGetMessage(24)" ")
     1256
     1257
    11661258    IF options.!debug == 1 THEN SAY time()' _TabbedDialogSetup done'
    11671259return
     
    12601352    WPSStartStop = VRGet("CB_WPSStartStop","set")
    12611353    say 'WPSStartStop = "'WPSStartStop'"'
     1354return
     1355
     1356/*:VRX         CN_CHKTDB_ContextMenu
     1357*/
     1358CN_CHKTDB_ContextMenu:
     1359    if VRInfo("Top") < 400 & VRGet("CN_Files", "View") = "Detail" then call _ColumnsMenu "CN_Files"
     1360    else do
     1361        RH = VRInfo("Record")
     1362        OH = VRInfo("Object")
     1363        if RH <> "" then do
     1364            ok = VRMethod( "Contextmenu_Files", "Popup", , , "", "PositionOnItem" )
     1365        end
     1366    end
    12621367return
    12631368
     
    18411946    ok = VRSet("PB_Cancel", "left",pbtn_pos + pbtn_dist * (pbtn_nr - 1))
    18421947
     1948    ok = VRset("GB_CHKTDB","Top",    margin  )
     1949    ok = VRset("GB_CHKTDB","Left",   marginx2)
     1950    ok = VRset("GB_CHKTDB","Width",  pane_width - 760)
     1951    ok = VRset("GB_CHKTDB","Height", pane_height- 1020)
     1952    ok = VRset("CN_CHKTDB","Top",    margin)
     1953    ok = VRset("CN_CHKTDB","Left",   margin)
     1954    ok = VRset("CN_CHKTDB","Width",  pane_width - 760 - marginx2 )
     1955    ok = VRset("CN_CHKTDB","Height", pane_height- 1020- marginx2 )
     1956
    18431957    ok = VRset("GB_USERS","Top",    margin  )
    18441958    ok = VRset("GB_USERS","Left",   marginx2)
     
    20432157
    20442158    say "  CurrentPageNr = "CurrentPageNr
    2045 
    2046     if CurrentPageNr = 2 then do
    2047         ok = VRset("Pict_Throbber", "Visible", 1)
    2048         ok = VRset("TM_Throbber", "Enabled", 1)
    2049         call _RefreshTree
    2050     end
    2051     else call _Refresh
     2159    select
     2160        when CurrentPageNr = 2 then do
     2161            ok = VRset("Pict_Throbber", "Visible", 1)
     2162            ok = VRset("TM_Throbber", "Enabled", 1)
     2163            call _RefreshTree
     2164        end
     2165        when CurrentPageNr = 6 then do
     2166            call _ChkTDB
     2167        end
     2168        otherwise call _Refresh
     2169    end
    20522170    IF options.!debug == 1 then say time()' PB_Refresh_Click() done'
    20532171return
     
    22242342return
    22252343
     2344/*:VRX         SW_CHKTDB_Close
     2345*/
     2346SW_CHKTDB_Close:
     2347    call SW_CHKTDB_Fini
     2348return
     2349
     2350/*:VRX         SW_CHKTDB_Create
     2351*/
     2352SW_CHKTDB_Create:
     2353    call SW_CHKTDB_Init
     2354return
     2355
     2356/*:VRX         SW_CHKTDB_Fini
     2357*/
     2358SW_CHKTDB_Fini:
     2359    window = VRInfo( "Window" )
     2360    call VRDestroy window
     2361    drop window
     2362return
     2363/*:VRX         SW_CHKTDB_Init
     2364*/
     2365SW_CHKTDB_Init:
     2366    window = VRInfo( "Object" )
     2367    if( \VRIsChildOf( window, "Notebook" ) ) then do
     2368        call VRMethod window, "CenterWindow"
     2369        call VRSet window, "Visible", 1
     2370        call VRMethod window, "Activate"
     2371    end
     2372    drop window
     2373return
     2374
    22262375/*:VRX         SW_DAEMONS_Close
    22272376*/
     
    24992648            nop
    25002649        end
    2501         when page = 6 then do /* Settings */
     2650        when page = 6 then do /* chkTDB */
     2651            say "ChkTDB"
     2652            call _ChkTDB
     2653        end
     2654        when page = 7 then do /* Settings */
    25022655            nop
    25032656        end
Note: See TracChangeset for help on using the changeset viewer.