#include <uuid/uuid.h>
#include <asl_private.h>
#include <os/transaction_private.h>
+
#include "daemon.h"
+
#define LIST_SIZE_DELTA 256
#define STATS_TABLE_SIZE 256
static OSSpinLock count_lock = 0;
-#if !TARGET_OS_EMBEDDED
+#if !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR)
static os_transaction_t main_transaction;
#endif
{
OSSpinLockLock(&count_lock);
-#if !TARGET_OS_EMBEDDED
+#if !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR)
if (global.client_count == 0) main_transaction = os_transaction_create("com.apple.syslogd");
#endif
global.client_count++;
OSSpinLockLock(&count_lock);
if (global.client_count > 0) global.client_count--;
-#if !TARGET_OS_EMBEDDED
+#if !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR)
if (global.client_count == 0) os_release(main_transaction);
#endif
global.debug_file = NULL;
global.launchd_enabled = 1;
-#if TARGET_OS_EMBEDDED
+#if (TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR)
global.dbtype = DB_TYPE_MEMORY;
#else
global.dbtype = DB_TYPE_FILE;
}
else
{
-#if TARGET_OS_EMBEDDED
+#if (TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR)
intval = DB_TYPE_MEMORY;
#else
intval = DB_TYPE_FILE;
return 0;
}
+
void
process_message(asl_msg_t *msg, uint32_t source)
{
status = aslmsg_verify(msg, source, &kplevel, &uid);
if (status == VERIFY_STATUS_OK)
{
+
if ((source == SOURCE_KERN) && (kplevel >= 0))
{
if (kplevel > 7) kplevel = 7;