[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: Some questions about handling filenames in wineserver
From:       Jin-oh Kang <jinoh.kang.kr () gmail ! com>
Date:       2023-04-25 15:35:09
Message-ID: CAMnQwqUOFLUR=-_7Co_mYsdjVNwBQmVs7FuUXH+DU9z2qkExYg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Apr 20, 2023, 2:11 AM Richard W.M. Jones <rjones@redhat.com> wrote:

> On Thu, Apr 20, 2023 at 12:58:04AM +0900, Jin-oh Kang wrote:
> > On Tue, Apr 18, 2023, 4:44 PM Richard W.M. Jones <rjones@redhat.com>
> wrote:
> > Supplemental question: There appears to be duplicate socket handling
> > code in wineserver server/sock.c and dlls/ntdll/unix/socket.c.
> > 
> > 
> > I don't believe this to be the case.
> > 
> > 
> > In my
> > tests only the wineserver code is called, and never the ntdll/unix
> > code.  Why is that?
> > 
> > 
> > This would need further elaboration: which part of dlls/ntdll/unix/* did
> you
> > expect to be called, but wasn't?
> 
> Thanks for the other tips.
> 
> In the case above I was referring to these pieces of code which both
> may be doing conversion to and from Unix sockaddr:
> 
> 
> https://gitlab.winehq.org/wine/wine/-/blob/9e99c6f66d236101a084b6a3a24c98b5c8677fe5/dlls/ntdll/unix/socket.c#L298
>  
> 
> https://gitlab.winehq.org/wine/wine/-/blob/9e99c6f66d236101a084b6a3a24c98b5c8677fe5/server/sock.c#L483
>  
> They appear identical.  In my test only the one in server/sock.c was
> called (not that I'm saying the other is never called, just that I
> didn't see it).
> 
> Are they used in different circumstances?
> 

The former sockadr_from_unix (in ntdll) seems to be for WS2 getpeername()
and recvfrom().

In case you haven't tried, running wine tests should give an idea about
which function is called in which scenario.


> Rich.
> 
> --
> Richard Jones, Virtualization Group, Red Hat
> http://people.redhat.com/~rjones
> Read my programming and virtualization blog: http://rwmj.wordpress.com
> Fedora Windows cross-compiler. Compile Windows programs, test, and
> build Windows installers. Over 100 libraries supported.
> http://fedoraproject.org/wiki/MinGW
> 
> 


[Attachment #5 (text/html)]

<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On \
Thu, Apr 20, 2023, 2:11 AM Richard W.M. Jones &lt;<a \
href="mailto:rjones@redhat.com">rjones@redhat.com</a>&gt; wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">On Thu, Apr 20, 2023 at 12:58:04AM +0900, Jin-oh Kang \
wrote:<br> &gt; On Tue, Apr 18, 2023, 4:44 PM Richard W.M. Jones &lt;<a \
href="mailto:rjones@redhat.com" target="_blank" \
rel="noreferrer">rjones@redhat.com</a>&gt; wrote:<br> &gt;        Supplemental \
question: There appears to be duplicate socket handling<br> &gt;        code in \
wineserver server/sock.c and dlls/ntdll/unix/socket.c.<br> &gt; <br>
&gt; <br>
&gt; I don&#39;t believe this to be the case.<br>
&gt; <br>
&gt; <br>
&gt;        In my<br>
&gt;        tests only the wineserver code is called, and never the ntdll/unix<br>
&gt;        code.   Why is that?<br>
&gt; <br>
&gt; <br>
&gt; This would need further elaboration: which part of dlls/ntdll/unix/* did you<br>
&gt; expect to be called, but wasn&#39;t?<br>
<br>
Thanks for the other tips.<br>
<br>
In the case above I was referring to these pieces of code which both<br>
may be doing conversion to and from Unix sockaddr:<br>
<br>
<a href="https://gitlab.winehq.org/wine/wine/-/blob/9e99c6f66d236101a084b6a3a24c98b5c8677fe5/dlls/ntdll/unix/socket.c#L298" \
rel="noreferrer noreferrer" \
target="_blank">https://gitlab.winehq.org/wine/wine/-/blob/9e99c6f66d236101a084b6a3a24c98b5c8677fe5/dlls/ntdll/unix/socket.c#L298</a><br>
 <br>
<a href="https://gitlab.winehq.org/wine/wine/-/blob/9e99c6f66d236101a084b6a3a24c98b5c8677fe5/server/sock.c#L483" \
rel="noreferrer noreferrer" \
target="_blank">https://gitlab.winehq.org/wine/wine/-/blob/9e99c6f66d236101a084b6a3a24c98b5c8677fe5/server/sock.c#L483</a><br>
 <br>
They appear identical.   In my test only the one in server/sock.c was<br>
called (not that I&#39;m saying the other is never called, just that I<br>
didn&#39;t see it).<br>
<br>
Are they used in different circumstances?<br></blockquote></div></div><div \
dir="auto"><br></div><div dir="auto">The former sockadr_from_unix (in ntdll) seems to \
be for WS2 getpeername() and recvfrom().</div><div dir="auto"><br></div><div \
dir="auto">In case you haven&#39;t tried, running wine tests should give an idea \
about which function is called in which scenario.</div><div dir="auto"><br></div><div \
dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 \
0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>
Rich.<br>
<br>
-- <br>
Richard Jones, Virtualization Group, Red Hat <a \
href="http://people.redhat.com/~rjones" rel="noreferrer noreferrer" \
target="_blank">http://people.redhat.com/~rjones</a><br> Read my programming and \
virtualization blog: <a href="http://rwmj.wordpress.com" rel="noreferrer noreferrer" \
target="_blank">http://rwmj.wordpress.com</a><br> Fedora Windows cross-compiler. \
Compile Windows programs, test, and<br> build Windows installers. Over 100 libraries \
supported.<br> <a href="http://fedoraproject.org/wiki/MinGW" rel="noreferrer \
noreferrer" target="_blank">http://fedoraproject.org/wiki/MinGW</a><br> <br>
</blockquote></div></div></div>





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic