state = talloc(ev_ctx, struct dcerpc_ncacn_listen_state);
if (!state) {
- DEBUG(0, ("Out of memory\n"));
+ DBG_ERR("Out of memory\n");
return NT_STATUS_NO_MEMORY;
}
state->fd = -1;
state->ep.name = talloc_strdup(state, pipe_name);
if (state->ep.name == NULL) {
- DEBUG(0, ("Out of memory\n"));
+ DBG_ERR("Out of memory\n");
status = NT_STATUS_NO_MEMORY;
goto out;
}
rc = listen(state->fd, 5);
if (rc < 0) {
status = map_nt_error_from_unix_common(errno);
- DEBUG(0, ("Failed to listen on pipe socket %s: %s\n",
- pipe_name, strerror(errno)));
+ DBG_ERR("Failed to listen on ncacn_np socket %s: %s\n",
+ pipe_name, strerror(errno));
goto out;
}
state->ev_ctx = ev_ctx;
state->msg_ctx = msg_ctx;
- DEBUG(10, ("Opened pipe socket fd %d for %s\n",
- state->fd, pipe_name));
+ DBG_DEBUG("Opened pipe socket fd %d for %s\n",
+ state->fd, pipe_name);
errno = 0;
fde = tevent_add_fd(ev_ctx,
errno = ENOMEM;
}
status = map_nt_error_from_unix_common(errno);
- DEBUG(0, ("Failed to add event handler!\n"));
+ DBG_ERR("Failed to add event handler for ncacn_np: %s\n",
+ strerror(errno));
goto out;
}