Hey Jonathan,

I am transitively importing version 2.0.19 of mina-core through the
sshd-core dependency (as I don't think it is safe to upgrade mina-core to
2.1 as I am using the sshd project).

I started with the 2.1 version of the SshFilter as a template for the
filter I am working on, as such it took some time to find the extra .mark()
call which was present in the older version of the SslFilter.

I am afraid my error handling/testing still needs some work, so all I can
really say at the moment is that with the .mark() call in place the code
appears to function correctly, however if the .mark() call is removed the
code fails - specifically I only receive one packet then receive no further
packets - again this is code compiled against mina-core 2.0.


With respect to your specific points:

     1> Some things aren't being back-ported to 2.0.X,
          the SSL improvements are one.

I don't think this issue is specific to Ssl, I think it affects any filter
that processes IoBuffers in the 2.0 code base (note: my test sample here is
one project). Also note I do not use reset() anywhere in my code and the
only mark() call I make is in a similar location to the one in the
SslFilter.

      2> What call?  the mark() was removed, so it is not needed.

Yes, I was referring to the mark call.
I will remove it from my code once the Sshd project forward ports to 2.1

    3> Shouldn't be necessary because you shouldn't have to change any of
your

Other people may be in the same position as me, having to downgrade to 2.0
due to other dependencies. It would be useful to know about this extra call
needed in 2.0


Thanks,
David




On Fri, May 3, 2019 at 5:22 PM Jonathan Valliere <[email protected]> wrote:

> David,
>
> The `buf.mark()` and `buf.reset()` calls are dangerous when used in
> conjunction with a dynamic call stack and are being removed from the MINA
> Filter system to improve compatibility with the code you write.
>
> 1> Some things aren't being back-ported to 2.0.X, the SSL improvements are
> one.
> 2> What call?  the mark() was removed, so it is not needed.
> 3> Shouldn't be necessary because you shouldn't have to change any of your
> code.
>
> Did removal of this mark() break your code?
>
> On Fri, May 3, 2019 at 6:29 PM David Trott <[email protected]> wrote:
>
> > Hey,
> >
> > I am working on an IoFilter similar in location/function to the SslFilter
> > (but implementing a different protocol). I noted there was a delta
> between
> > 2.0 and 2.1 code in the SslFilter.
> >
> > Specifically commit 2d08d530961597b9f21dff861725f08e73fb9291
> > Has removed the call to  buf.mark();         // Approx Line 654
> >
> > In my filter (compiled against 2.0) I also need the same buf.mark() call
> as
> > the SslFilter uses.
> >
> > Could I ask the following questions:
> > 1.> Why does the 2.0 code base need this call?
> > 2.> Is this call needed in the 2.1 code base?
> > 3.> Would it be possible to update the (2.1-vs-2.0) migration web page to
> > include a note about this change?
> >
> >
> > Thanks,
> > David
> >
>

Reply via email to