Fixed a couple of error codes.
This commit is contained in:
parent
e491e8f897
commit
f895ad180d
|
@ -331,13 +331,13 @@ int close_handle( struct process *process, obj_handle_t handle, int *fd )
|
||||||
if (!(entry = get_handle( process, handle ))) return 0;
|
if (!(entry = get_handle( process, handle ))) return 0;
|
||||||
if (entry->access & RESERVED_CLOSE_PROTECT)
|
if (entry->access & RESERVED_CLOSE_PROTECT)
|
||||||
{
|
{
|
||||||
set_error( STATUS_INVALID_HANDLE );
|
set_error( STATUS_HANDLE_NOT_CLOSABLE );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
obj = entry->ptr;
|
obj = entry->ptr;
|
||||||
if (!obj->ops->close_handle( obj, process, handle ))
|
if (!obj->ops->close_handle( obj, process, handle ))
|
||||||
{
|
{
|
||||||
set_error( STATUS_INVALID_HANDLE );
|
set_error( STATUS_HANDLE_NOT_CLOSABLE );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
entry->ptr = NULL;
|
entry->ptr = NULL;
|
||||||
|
|
|
@ -270,7 +270,7 @@ struct thread *get_thread_from_id( thread_id_t id )
|
||||||
struct object *obj = get_ptid_entry( id );
|
struct object *obj = get_ptid_entry( id );
|
||||||
|
|
||||||
if (obj && obj->ops == &thread_ops) return (struct thread *)grab_object( obj );
|
if (obj && obj->ops == &thread_ops) return (struct thread *)grab_object( obj );
|
||||||
set_win32_error( ERROR_INVALID_THREAD_ID );
|
set_error( STATUS_INVALID_CID );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue