Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/registry/reg_perfcount.c

    r414 r745  
    2121
    2222#include "includes.h"
     23#include "system/filesys.h"
     24#include "../librpc/gen_ndr/perfcount.h"
     25#include "registry.h"
     26#include "reg_perfcount.h"
     27#include "../libcli/registry/util_reg.h"
     28#include "util_tdb.h"
    2329
    2430#undef DBGC_CLASS
     
    4248        TALLOC_CTX *ctx = talloc_tos();
    4349
     50        path = state_path(PERFCOUNTDIR);
     51        if (!directory_exist(path)) {
     52                mkdir(path, 0755);
     53        }
     54
    4455        path = talloc_asprintf(ctx, "%s/%s", PERFCOUNTDIR, dbname);
    4556        if (!path) {
     
    5061        TALLOC_FREE(path);
    5162        return ret;
    52 }
    53 
    54 /*********************************************************************
    55 *********************************************************************/
    56 
    57 void perfcount_init_keys( void )
    58 {
    59         char *p = state_path(PERFCOUNTDIR);
    60 
    61         /* no registry keys; just create the perfmon directory */
    62 
    63         if ( !directory_exist( p ) )
    64                 mkdir( p, 0755 );
    65 
    66         return;
    6763}
    6864
     
    619615        memset(buf, 0, PERFCOUNT_MAX_LEN);
    620616        memcpy(buf, data.dptr, data.dsize);
    621         begin = index(buf, '[');
    622         end = index(buf, ']');
     617        begin = strchr(buf, '[');
     618        end = strchr(buf, ']');
    623619        if(begin == NULL || end == NULL)
    624620                return False;
     
    626622
    627623        while(start < end) {
    628                 stop = index(start, ',');
     624                stop = strchr(start, ',');
    629625                if(stop == NULL)
    630626                        stop = end;
Note: See TracChangeset for help on using the changeset viewer.