#define PROF_SHM_MAGIC 0x6349985
#define PROF_SHM_VERSION 13
-#ifdef WITH_PROFILE
#define IPC_PERMS ((S_IRUSR | S_IWUSR) | S_IRGRP | S_IROTH)
-#endif /* WITH_PROFILE */
-#ifdef WITH_PROFILE
static int shm_id;
static bool read_only;
-#endif
struct profile_header {
int prof_shm_magic;
****************************************************************************/
void set_profile_level(int level, struct server_id src)
{
-#ifdef WITH_PROFILE
switch (level) {
case 0: /* turn off profiling */
do_profile_flag = False;
(int)procid_to_pid(&src)));
break;
}
-#else /* WITH_PROFILE */
- DEBUG(1,("INFO: Profiling support unavailable in this build.\n"));
-#endif /* WITH_PROFILE */
}
-#ifdef WITH_PROFILE
-
/****************************************************************************
receive a set profile level message
****************************************************************************/
{
int level;
-#ifdef WITH_PROFILE
level = 1 + (do_profile_flag?2:0) + (do_profile_times?4:0);
-#else
- level = 0;
-#endif
+
DEBUG(1,("INFO: Received REQ_PROFILELEVEL message from PID %u\n",
(unsigned int)procid_to_pid(&src)));
messaging_send_buf(msg_ctx, src, MSG_PROFILELEVEL,
SMB_ASSERT(val < PR_VALUE_MAX);
return valnames[val];
}
-
-#endif /* WITH_PROFILE */
--- /dev/null
+/*
+ * Unix SMB/CIFS implementation.
+ * profile.c implementation if profiles are not enabled
+ * Copyright (C) Volker Lendecke 2014
+ *
+ * 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "includes.h"
+#include "smbprofile.h"
+
+bool profile_setup(struct messaging_context *msg_ctx, bool rdonly)
+{
+ return true;
+}
+
+void set_profile_level(int level, struct server_id src)
+{
+ DEBUG(1,("INFO: Profiling support unavailable in this build.\n"));
+}
NDR_OPEN_FILES
FNAME_UTIL''')
-bld.SAMBA3_SUBSYSTEM('PROFILE',
- source='profile/profile.c',
- deps='samba-util')
+if bld.CONFIG_GET("WITH_PROFILE"):
+ bld.SAMBA3_SUBSYSTEM('PROFILE',
+ source='profile/profile.c',
+ deps='samba-util')
+else:
+ bld.SAMBA3_SUBSYSTEM('PROFILE',
+ source='profile/profile_dummy.c',
+ deps='')
bld.SAMBA3_SUBSYSTEM('PRINTBASE',
source='''printing/notify.c printing/printing_db.c''',