]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netat/ddp_usrreq.c
xnu-792.2.4.tar.gz
[apple/xnu.git] / bsd / netat / ddp_usrreq.c
index 7d327ab6008cb05d72c13e12c7df27f99e39f9a8..9331419cb43ae05b47cb2620a4763a02143aa4db 100644 (file)
@@ -84,14 +84,17 @@ int ddp_pru_attach(struct socket *so, int proto,
        at_ddp_t *ddp = NULL;
        struct atpcb *pcb = (struct atpcb *)((so)->so_pcb);
 
+        error = soreserve(so, ddp_sendspace, ddp_recvspace);
+       if (error != 0)
+               return error;
+
        s = splnet();
        error = at_pcballoc(so, &ddp_head);
        splx(s);
        if (error)
                return error;
-       error = soreserve(so, ddp_sendspace, ddp_recvspace);
        pcb = (struct atpcb *)((so)->so_pcb);
-       pcb->pid = current_proc()->p_pid;
+       pcb->pid = proc_selfpid();
        pcb->ddptype = (u_char) proto;    /* set in socreate() */
        pcb->proto = ATPROTO_DDP;