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: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-08-30 22:26:01 -05:00 committed by Alexandre Julliard
parent 56104123d9
commit bd1aed5319
5 changed files with 7 additions and 7 deletions

View file

@ -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;

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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 );

View file

@ -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 );