--- /dev/null
+.DS_Store
+/DerivedData
+
+# /
+/build
+
+# /syslog.xcodeproj/
+/syslog.xcodeproj/*.xcworkspace
+/syslog.xcodeproj/xcuserdata
+/syslog.xcodeproj/*.mode1v3
+/syslog.xcodeproj/*.mode2v3
+/syslog.xcodeproj/*.pbxuser
+/syslog.xcodeproj/*.perspectivev3
return 0;
}
+
+void
+asl_action_out_module_query(asl_msg_t *q, asl_msg_t *m, bool all)
+{
+ dispatch_sync(asl_action_queue, ^{
+ asl_out_module_t *om;
+ const char *val;
+ for (om = global.asl_out_module; om != NULL; om = om->next)
+ {
+ if (all || (0 == asl_msg_lookup(q, om->name, NULL, NULL)))
+ {
+ val = om->flags & MODULE_FLAG_ENABLED ? "enabled" : "disabled";
+ if (om->name == NULL) asl_msg_set_key_val(m, "asl.conf", val);
+ else asl_msg_set_key_val(m, om->name, val);
+ }
+ }
+ });
+}
void bsd_out_message(asl_msg_t *msg, int64_t msize);
int control_set_param(const char *s, bool eval);
int asl_action_control_set_param(const char *s);
+void asl_action_out_module_query(asl_msg_t *q, asl_msg_t *m, bool all);
/* notify SPI */
uint32_t notify_register_plain(const char *name, int *out_token);
asl_msg_t *m;
char val[256];
const char *mval;
- asl_out_module_t *om;
if (res == NULL) return ASL_STATUS_INVALID_ARG;
*res = NULL;
}
}
- for (om = global.asl_out_module; om != NULL; om = om->next)
- {
- if (all || (0 == asl_msg_lookup(q, om->name, NULL, NULL)))
- {
- snprintf(val, sizeof(val), "%s", om->flags & MODULE_FLAG_ENABLED ? "enabled" : "disabled");
- if (om->name == NULL) asl_msg_set_key_val(m, "asl.conf", val);
- else asl_msg_set_key_val(m, om->name, val);
- }
- }
+ /* output module query must be on the asl_action_queue */
+ asl_action_out_module_query(q, m, all);
/* synchronous actions use queries, since messages are simpleroutines */
if (0 == asl_msg_lookup(q, "action", &mval, NULL))
abort();
}
- if (request->head.msgh_id == MACH_NOTIFY_DEAD_NAME)
+ if (request->head.msgh_local_port == global.dead_session_port &&
+ request->head.msgh_id == MACH_NOTIFY_DEAD_NAME)
{
deadname = (mach_dead_name_notification_t *)request;
dispatch_async(asl_server_queue, ^{