Changeset 745 for trunk/server/source3/registry/reg_perfcount.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/registry/reg_perfcount.c
r414 r745 21 21 22 22 #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" 23 29 24 30 #undef DBGC_CLASS … … 42 48 TALLOC_CTX *ctx = talloc_tos(); 43 49 50 path = state_path(PERFCOUNTDIR); 51 if (!directory_exist(path)) { 52 mkdir(path, 0755); 53 } 54 44 55 path = talloc_asprintf(ctx, "%s/%s", PERFCOUNTDIR, dbname); 45 56 if (!path) { … … 50 61 TALLOC_FREE(path); 51 62 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;67 63 } 68 64 … … 619 615 memset(buf, 0, PERFCOUNT_MAX_LEN); 620 616 memcpy(buf, data.dptr, data.dsize); 621 begin = index(buf, '[');622 end = index(buf, ']');617 begin = strchr(buf, '['); 618 end = strchr(buf, ']'); 623 619 if(begin == NULL || end == NULL) 624 620 return False; … … 626 622 627 623 while(start < end) { 628 stop = index(start, ',');624 stop = strchr(start, ','); 629 625 if(stop == NULL) 630 626 stop = end;
Note:
See TracChangeset
for help on using the changeset viewer.