Re: [hatari-devel] (raw) MIDI connection reliability? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] (raw) MIDI connection reliability?
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sun, 26 Jun 2022 06:56:01 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1656226564; bh=T9Ma7Ym2046elIzaEW3qVAVXaBM3kXEfSb9f6wQn8VY=; h=Date:From:To:Subject:From; b=qTVczUCsXC5wuvJ4yD3Q7Ix4qkHoQwY5O9E1YdEdbx8dbU9W/hnaL2YOL5cTCVPfg gYszLJgZiXCwYUAqbjrxEF1jHeGDVoRf2NFwD2drk7hPcrVmxzs1BO3SndkOsvtaFm IfEYLYH34zXGY1HxPF/490NbBb3Ox38CyQjSW5VwsLQATvDp+Ftt+M39olFsOEKNKt 88MVRQRUp1k386D4wtWV96Y1+n9H7Z2va+6CpssLvhCMv/qCAE4onHJsKH41XkieYV OrNAzxKGGK4d6IoDI3LbbItgKzCqAL1iXII591nwfbLQhyFlmqv68iI0t+SIu3MTNu /br3Yc81Mmcfg==
Am Sat, 25 Jun 2022 13:40:17 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> Hi,
>
> On 25.6.2022 10.48, Thomas Huth wrote:
> > Am Sat, 18 Jun 2022 16:19:43 +0300
> > schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> >> On 18.6.2022 16.05, Eero Tamminen wrote:
> >>>> Anyway, since EOF is guaranteed to be negative, it shouldn't
> >>>> really matter much in this case, so never mind, let's just
> >>>> leave the code as it is.
> >>>
> >>> I think I need to update logging to check errno instead of return value.
> >>> Now it ignores all errors as they all get mapped to EOF return value.
> >>
> >> Does attached patch look OK? I mean, can we trust on errno being set
> >> (glibc fgetc manual does not say anything about errno)...
> >
> > I don't think this is ok yet: According to the 3p man page of fgetc, errno
> > only gets set on errors, not on end-of-file conditions, so I think you
> > explicitely have to clear errno first if you want to check it afterwards.
>
> Thanks. With that fixed, does it look good enough to go in for the release?
Should be fine, I guess. In the worst case, we just get bogus error
messages here, right?
> Btw. I forgot to mention results of my debugging yesterday:
>
> * There were no errors logged (once I disregarded some pre-existing
> "file not found" errno value).
>
> * It seemed that MidWiz receiving end tried to read one byte more than
> was written. I'm not sure about that though because both ends were
> hanging though
I assume the problem is not related to the host side, but rather a bug in
the MIDI hardware emulation. Needs more investigation, but I think this
should not block the release since it is not a regression.
Thomas