asldebug("register_session: %u PID %d\n", (unsigned int)task_name, (int)pid);
/* register for port death notification */
+ previous = MACH_PORT_NULL;
mach_port_request_notification(mach_task_self(), task_name, MACH_NOTIFY_DEAD_NAME, 0, global.dead_session_port, MACH_MSG_TYPE_MAKE_SEND_ONCE, &previous);
mach_port_deallocate(mach_task_self(), previous);
uint32_t outlen;
kern_return_t kstatus;
+ *reply = NULL;
+ *replyCnt = 0;
+ *lastid = 0;
*status = ASL_STATUS_OK;
if ((request != NULL) && (request[requestCnt - 1] != '\0'))
{
- *status = ASL_STATUS_INVALID_ARG;
vm_deallocate(mach_task_self(), (vm_address_t)request, requestCnt);
+ *status = ASL_STATUS_INVALID_ARG;
return KERN_SUCCESS;
}
if (kstatus != KERN_SUCCESS)
{
free(out);
- return kstatus;
+ *status = ASL_STATUS_FAILED;
+ return KERN_SUCCESS;
}
memmove(vmbuffer, out, outlen);
security_token_t *token
)
{
- return KERN_SUCCESS;
+ return KERN_FAILURE;
}
/*
char *url, *vmbuffer;
int fd;
- *status = ASL_STATUS_OK;
*fileport = MACH_PORT_NULL;
- *newurl = 0;
+ *newurl = NULL;
+ *newurlCnt = 0;
+ *status = ASL_STATUS_OK;
if (message == NULL)
{
if (message[messageCnt - 1] != '\0')
{
- *status = ASL_STATUS_INVALID_ARG;
vm_deallocate(mach_task_self(), (vm_address_t)message, messageCnt);
+ *status = ASL_STATUS_INVALID_ARG;
return KERN_SUCCESS;
}
if ((global.dbtype & DB_TYPE_FILE) == 0)
{
+ vm_deallocate(mach_task_self(), (vm_address_t)message, messageCnt);
*status = ASL_STATUS_INVALID_STORE;
return KERN_SUCCESS;
}
- *fileport = MACH_PORT_NULL;
-
msg = asl_msg_from_string(message);
vm_deallocate(mach_task_self(), (vm_address_t)message, messageCnt);
if (kstatus != KERN_SUCCESS)
{
free(url);
- return kstatus;
+ *status = ASL_STATUS_FAILED;
+ return KERN_SUCCESS;
}
memmove(vmbuffer, url, *newurlCnt);