[PATCH] fix cid 1350009
Anoop C S
anoopcs at redhat.com
Thu Feb 11 10:00:11 UTC 2016
On Wed, 2016-02-10 at 13:07 +0100, Michael Adam wrote:
> On 2016-02-10 at 12:53 +0200, Uri Simchoni wrote:
> > On 02/10/2016 12:03 PM, Michael Adam wrote:
> > > On 2016-02-10 at 09:46 +0200, Uri Simchoni wrote:
> > > > It's better, but having carefully looked at it now, I think you
> > > > also want to
> > > > set speed to 0 on all failure paths, or report failure to
> > > > caller and let it
> > > > intelligently deal with it.
> > > Well, I also thought about it.
> > > Currently the pattern is: only set speed on success.
> > > Otherwise leave speed untouched. In the current caller
> > > this means that the default is used.
> > >
> > > Of course we could propagate the error, but it seemed
> > > the most simple this way.
> > >
> > > What specific problem do you see with the current way?
> > >
> > > Thanks - Michael
> > >
> > a. It's not always the default - it's the last interface's result
> > (it's in a
> > loop)
> Oh, true!
> The if_speed variable is in the wrong scope.
> I'd say fixing this is a separate patch though.
Thanks Uri for bringing this up. I will send a patch to address this
> > b. I'd say that if the name is too long, don't use that interface.
> > Speed:=0
> > is one way of doing it.
> But somehow the interface got there, so maybe it has its purpose?
> I also think this change of treatment of error is the topic
> of another patch that broadly changes the error treatment in this
> function, as you suggested.
> Could we get this CID fix in now and do further improvements
> (directly) afterwards? I'd be willing to argue to do the
> speed = 0 in this special case.
> Thanks - Michael
More information about the samba-technical