Commit bd1aed53 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

nsiproxy: Return STATUS_BUFFER_OVERFLOW to signal short buffers.

STATUS_MORE_ENTRIES is used for directory enumeration APIs, and signals that a continuation will be returned on the next call. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 56104123
......@@ -74,7 +74,7 @@ static void nsiproxy_enumerate_all( IRP *irp )
enum_all.count = in->count;
irp->IoStatus.u.Status = nsi_enumerate_all_ex( &enum_all );
if (irp->IoStatus.u.Status == STATUS_SUCCESS || irp->IoStatus.u.Status == STATUS_MORE_ENTRIES)
if (irp->IoStatus.u.Status == STATUS_SUCCESS || irp->IoStatus.u.Status == STATUS_BUFFER_OVERFLOW)
{
irp->IoStatus.Information = out_len;
*(DWORD *)out = enum_all.count;
......
......@@ -754,7 +754,7 @@ static NTSTATUS ip_unicast_enumerate_all( int family, void *key_data, DWORD key_
freeifaddrs( addrs );
if (!want_data || num <= *count) *count = num;
else status = STATUS_MORE_ENTRIES;
else status = STATUS_BUFFER_OVERFLOW;
return status;
}
......@@ -990,7 +990,7 @@ static NTSTATUS ipv4_neighbour_enumerate_all( void *key_data, DWORD key_size, vo
#endif
if (!want_data || num <= *count) *count = num;
else status = STATUS_MORE_ENTRIES;
else status = STATUS_BUFFER_OVERFLOW;
return status;
}
......@@ -1233,7 +1233,7 @@ static NTSTATUS ipv4_forward_enumerate_all( void *key_data, DWORD key_size, void
#endif
if (!want_data || num <= *count) *count = num;
else status = STATUS_MORE_ENTRIES;
else status = STATUS_BUFFER_OVERFLOW;
return status;
}
......
......@@ -488,7 +488,7 @@ static NTSTATUS ifinfo_enumerate_all( void *key_data, DWORD key_size, void *rw_d
LeaveCriticalSection( &if_list_cs );
if (!want_data || num <= *count) *count = num;
else status = STATUS_MORE_ENTRIES;
else status = STATUS_BUFFER_OVERFLOW;
return status;
}
......
......@@ -736,7 +736,7 @@ static NTSTATUS tcp_conns_enumerate_all( DWORD filter, struct nsi_tcp_conn_key *
#endif
if (!want_data || num <= *count) *count = num;
else status = STATUS_MORE_ENTRIES;
else status = STATUS_BUFFER_OVERFLOW;
heap_free( pid_map );
heap_free( addr_scopes );
......
......@@ -390,7 +390,7 @@ static NTSTATUS udp_endpoint_enumerate_all( void *key_data, DWORD key_size, void
#endif
if (!want_data || num <= *count) *count = num;
else status = STATUS_MORE_ENTRIES;
else status = STATUS_BUFFER_OVERFLOW;
heap_free( pid_map );
heap_free( addr_scopes );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment