pid = tevent_cached_getpid();
+ ret = tdb_chainlock(smbprofile_state.internal.db->tdb, key);
+ if (ret != 0) {
+ return;
+ }
+
+ tdb_parse_record(smbprofile_state.internal.db->tdb,
+ key, profile_stats_parser, &s);
+
+ smbprofile_stats_accumulate(profile_p, &s);
+
#ifdef HAVE_GETRUSAGE
ret = getrusage(RUSAGE_SELF, &rself);
if (ret != 0) {
rself.ru_stime.tv_usec;
#endif /* HAVE_GETRUSAGE */
- ret = tdb_chainlock(smbprofile_state.internal.db->tdb, key);
- if (ret != 0) {
- return;
- }
-
- tdb_parse_record(smbprofile_state.internal.db->tdb,
- key, profile_stats_parser, &s);
-
- smbprofile_stats_accumulate(profile_p, &s);
-
tdb_store(smbprofile_state.internal.db->tdb, key,
(TDB_DATA) {
.dptr = (uint8_t *)profile_p,