Hi Hans,
Hans Leidekker wrote:
+static BOOL session_set_option( object_header_t *hdr, DWORD option, LPVOID buffer, DWORD buflen ) +{
- if (hdr->type != WINHTTP_HANDLE_TYPE_SESSION)
- {
release_object( hdr );
set_last_error( ERROR_WINHTTP_INCORRECT_HANDLE_TYPE );
return FALSE;
release_object call looks wrong here. Also, if you use vtbls properly, you shouldn't need to check the type here.
Jacek
On Wednesday 03 September 2008 16:37:48 Jacek Caban wrote:
+static BOOL session_set_option( object_header_t *hdr, DWORD option, LPVOID buffer, DWORD buflen ) +{
- if (hdr->type != WINHTTP_HANDLE_TYPE_SESSION)
- {
release_object( hdr );
set_last_error( ERROR_WINHTTP_INCORRECT_HANDLE_TYPE );
return FALSE;
release_object call looks wrong here. Also, if you use vtbls properly, you shouldn't need to check the type here.
Thanks for catching that, I forgot to remove those blocks after copy-pasting from an old patch. Revised patch sent.
-Hans