PCONNECTION_ENDPOINT Connection = (PCONNECTION_ENDPOINT)DeferredContext;
PLIST_ENTRY Entry;
PTDI_BUCKET Bucket;
- NTSTATUS Status;
-
+
LockObjectAtDpcLevel(Connection);
-
+
/* We timed out waiting for pending sends so force it to shutdown */
- Status = TCPTranslateError(LibTCPShutdown(Connection, 0, 1));
-
+ TCPTranslateError(LibTCPShutdown(Connection, 0, 1));
+
while (!IsListEmpty(&Connection->SendRequest))
{
Entry = RemoveHeadList(&Connection->SendRequest);
NTSTATUS TCPClose( PCONNECTION_ENDPOINT Connection )
{
KIRQL OldIrql;
- PVOID Socket;
LockObject(Connection, &OldIrql);
- Socket = Connection->SocketContext;
-
FlushAllQueues(Connection, STATUS_CANCELLED);
LibTCPClose(Connection, FALSE, TRUE);
Status = TCPTranslateError(LibTCPSend(Connection,
BufferData,
SendLength,
+ BytesSent,
FALSE));
TI_DbgPrint(DEBUG_TCP,("[IP, TCPSendData] Send: %x, %d\n", Status, SendLength));
Bucket->Request.RequestNotifyObject = Complete;
Bucket->Request.RequestContext = Context;
- *BytesSent = 0;
InsertTailList( &Connection->SendRequest, &Bucket->Entry );
TI_DbgPrint(DEBUG_TCP,("[IP, TCPSendData] Queued write irp\n"));
}
- else if (Status == STATUS_SUCCESS)
- {
- *BytesSent = SendLength;
- }
- else
- {
- *BytesSent = 0;
- }
UnlockObject(Connection, OldIrql);
UnlockObject(Connection, OldIrql);
AddressIP->Address[0].Address[0].in_addr = ipaddr.addr;
+
+ RtlZeroMemory(&AddressIP->Address[0].Address[0].sin_zero,
+ sizeof(AddressIP->Address[0].Address[0].sin_zero));
return Status;
}
return Found;
}
+NTSTATUS
+TCPSetNoDelay(
+ PCONNECTION_ENDPOINT Connection,
+ BOOLEAN Set)
+{
+ if (!Connection)
+ return STATUS_UNSUCCESSFUL;
+
+ if (Connection->SocketContext == NULL)
+ return STATUS_UNSUCCESSFUL;
+
+ LibTCPSetNoDelay(Connection->SocketContext, Set);
+ return STATUS_SUCCESS;
+}
+
+
/* EOF */