<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 15.09.2017 07:05, Anton Romanov
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJHYP3g3OtPv1gTBBsN4GqC4TFWa8Lr2Ez8n6GQMJua39Ngoaw@mail.gmail.com">
<pre wrap="">On Thu, Sep 14, 2017 at 10:57 AM, Jacek Caban <a class="moz-txt-link-rfc2396E" href="mailto:jacek@codeweavers.com"><jacek@codeweavers.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi Anton,
On 14.09.2017 18:30, Anton Romanov wrote:
</pre>
<blockquote type="cite">
<pre wrap=""> ctx->req_ctx_attr = fContextReq;
- transport.ctx = ctx;
- init_schan_buffers(&transport.in, pInput, schan_init_sec_ctx_get_next_input_buffer);
- transport.in.limit = expected_size;
- init_schan_buffers(&transport.out, pOutput, schan_init_sec_ctx_get_next_output_buffer);
- schan_imp_set_session_transport(ctx->session, &transport);
+ ctx->transport.ctx = ctx;
</pre>
</blockquote>
<pre wrap="">
One last thing, please move this line closer to
schan_imp_create_session, where it belongs. transport.ctx should be set
once, during context creation, and not touched later. Other than that,
the patch looks good.
</pre>
</blockquote>
<pre wrap="">But ctx is also being set in the else branch, just couple of lines
above the changed ones [1]
So, moving it closer to schan_imp_create_session would be wrong, wouldn't it?
1. <a class="moz-txt-link-freetext" href="https://github.com/theli-ua/wine/blob/5c2a7a64e1866f97d9522e310e2c881c704adf3b/dlls/secur32/schannel.c#L889">https://github.com/theli-ua/wine/blob/5c2a7a64e1866f97d9522e310e2c881c704adf3b/dlls/secur32/schannel.c#L889</a>
</pre>
</blockquote>
<p><br>
</p>
<p>This else branch uses already created context. Those are contexts
that are created in <span class="pl-k">if</span> (!phContext)
branch in earlier <span class="pl-en">schan_InitializeSecurityContextW</span>
call. Once created, context pointer never changes, so if you set
it once, it will still be valid in subsequent calls. Or am I
missing something?</p>
<p><br>
</p>
<p>Thanks,</p>
<p>Jacek<br>
</p>
</body>
</html>