[tarantool-patches] Re: [PATCH] Replace sendmsg with sendto shortcut
Kirill Yukhin
kyukhin at tarantool.org
Thu Aug 22 16:15:23 MSK 2019
Hello,
On 20 Aug 15:01, Max Melentiev wrote:
> There is a problem with calculating .msg_namelen field
> of msghdr struct. Instead of
>
> .msg_name = &sa,
> .msg_namelen = sizeof(sa.sun_family) + strlen(sd_unix_path),
>
> it must set as
>
> .msg_namelen = sizeof(sa) // larger value than current invalid one
>
> It works on linux but when I tried to enable this feature for macOS
> it didn't (maybe because of different order of fields in the struct).
>
> Instead of fixing calculation, I've replaced original sendmsg call
> with sendto, because it's a convenient shortcut which
> simplifies code and can prevent such mistakes.
I've checked your patch into 1.10, 2.1, 2.2 and master.
--
Regards, Kirill Yukhin
More information about the Tarantool-patches
mailing list