This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
BOOL do_profile_times = False;
/****************************************************************************
-receive a set profile level message
+Set a profiling level.
****************************************************************************/
-void profile_message(int msg_type, struct process_id src, void *buf, size_t len)
+void set_profile_level(int level, struct server_id src)
{
- int level;
-
- memcpy(&level, buf, sizeof(int));
#ifdef WITH_PROFILE
switch (level) {
case 0: /* turn off profiling */
#endif /* WITH_PROFILE */
}
+/****************************************************************************
+receive a set profile level message
+****************************************************************************/
+static void profile_message(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id src,
+ DATA_BLOB *data)
+{
+ int level;
+
+ if (data->length != sizeof(level)) {
+ DEBUG(0, ("got invalid profile message\n"));
+ return;
+ }
+
+ memcpy(&level, data->data, sizeof(level));
+ set_profile_level(level, src);
+}
+
/****************************************************************************
receive a request profile level message
****************************************************************************/
-void reqprofile_message(int msg_type, struct process_id src,
- void *buf, size_t len)
+static void reqprofile_message(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id src,
+ DATA_BLOB *data)
{
int level;
#endif
DEBUG(1,("INFO: Received REQ_PROFILELEVEL message from PID %u\n",
(unsigned int)procid_to_pid(&src)));
- message_send_pid(src, MSG_PROFILELEVEL, &level, sizeof(int), True);
+ messaging_send_buf(msg_ctx, src, MSG_PROFILELEVEL,
+ (uint8 *)&level, sizeof(level));
}
/*******************************************************************
}
#endif
-BOOL profile_setup(BOOL rdonly)
+BOOL profile_setup(struct messaging_context *msg_ctx, BOOL rdonly)
{
struct shmid_ds shm_ds;
}
profile_p = &profile_h->stats;
- message_register(MSG_PROFILE, profile_message);
- message_register(MSG_REQ_PROFILELEVEL, reqprofile_message);
+ if (msg_ctx != NULL) {
+ messaging_register(msg_ctx, NULL, MSG_PROFILE,
+ profile_message);
+ messaging_register(msg_ctx, NULL, MSG_REQ_PROFILELEVEL,
+ reqprofile_message);
+ }
return True;
}
"syscall_fchown", /* PR_VALUE_SYSCALL_FCHOWN */
"syscall_chdir", /* PR_VALUE_SYSCALL_CHDIR */
"syscall_getwd", /* PR_VALUE_SYSCALL_GETWD */
- "syscall_utime", /* PR_VALUE_SYSCALL_UTIME */
+ "syscall_ntimes", /* PR_VALUE_SYSCALL_NTIMES */
"syscall_ftruncate", /* PR_VALUE_SYSCALL_FTRUNCATE */
"syscall_fcntl_lock", /* PR_VALUE_SYSCALL_FCNTL_LOCK */
"syscall_kernel_flock", /* PR_VALUE_SYSCALL_KERNEL_FLOCK */
+ "syscall_linux_setlease", /* PR_VALUE_SYSCALL_LINUX_SETLEASE */
"syscall_fcntl_getlock", /* PR_VALUE_SYSCALL_FCNTL_GETLOCK */
"syscall_readlink", /* PR_VALUE_SYSCALL_READLINK */
"syscall_symlink", /* PR_VALUE_SYSCALL_SYMLINK */
"SMBunlock", /* PR_VALUE_SMBUNLOCK */
"SMBctemp", /* PR_VALUE_SMBCTEMP */
"SMBmknew", /* PR_VALUE_SMBMKNEW */
- "SMBchkpth", /* PR_VALUE_SMBCHKPTH */
+ "SMBcheckpath", /* PR_VALUE_SMBCHECKPATH */
"SMBexit", /* PR_VALUE_SMBEXIT */
"SMBlseek", /* PR_VALUE_SMBLSEEK */
"SMBlockread", /* PR_VALUE_SMBLOCKREAD */