[TCPIP][IP] Use an ERESOURCE as mutex for address files & connection end points
[reactos.git] / sdk / lib / drivers / ip / transport / udp / udp.c
index 783dae9..0ad09fa 100644 (file)
@@ -171,9 +171,8 @@ NTSTATUS UDPSendDatagram(
     USHORT RemotePort;
     NTSTATUS Status;
     PNEIGHBOR_CACHE_ENTRY NCE;
-    KIRQL OldIrql;
 
-    LockObject(AddrFile, &OldIrql);
+    LockObject(AddrFile);
 
     TI_DbgPrint(MID_TRACE,("Sending Datagram(%x %x %x %d)\n",
                                                   AddrFile, ConnInfo, BufferData, DataSize));
@@ -188,7 +187,7 @@ NTSTATUS UDPSendDatagram(
                break;
 
     default:
-               UnlockObject(AddrFile, OldIrql);
+               UnlockObject(AddrFile);
                return STATUS_UNSUCCESSFUL;
     }
 
@@ -200,7 +199,7 @@ NTSTATUS UDPSendDatagram(
          * interface we're sending over
          */
         if(!(NCE = RouteGetRouteToDestination( &RemoteAddress ))) {
-            UnlockObject(AddrFile, OldIrql);
+            UnlockObject(AddrFile);
             return STATUS_NETWORK_UNREACHABLE;
         }
 
@@ -209,7 +208,7 @@ NTSTATUS UDPSendDatagram(
     else
     {
         if(!(NCE = NBLocateNeighbor( &LocalAddress, NULL ))) {
-            UnlockObject(AddrFile, OldIrql);
+            UnlockObject(AddrFile);
             return STATUS_INVALID_PARAMETER;
         }
     }
@@ -223,7 +222,7 @@ NTSTATUS UDPSendDatagram(
                                                         BufferData,
                                                         DataSize );
 
-    UnlockObject(AddrFile, OldIrql);
+    UnlockObject(AddrFile);
 
     if( !NT_SUCCESS(Status) )
                return Status;