[pisa-src] Re: r1236 - in trunk/community-operator: Makefile.am co_client.c co_common_packets.h co_server.c

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Wed, 21 Oct 2009 00:00:14 +0200

On Tue, Oct 20, 2009 at 02:22:36PM +0200, Jan Marten wrote:
> > --- trunk/community-operator/Makefile.am      Mon Oct 19 17:37:26 2009
> >    (r1235)
> > > +++ trunk/community-operator/Makefile.am      Mon Oct 19 20:59:44 2009
> >      (r1236)
> > > @@ -19,6 +19,7 @@
> > >  INCLUDES += -I@PISA_HIPL_SRCDIR@/libdht
> > > +INCLUDES += -I@PISA_HIPL_SRCDIR@/opendht
> > >  INCLUDES += -I@PISA_HIPL_SRCDIR@/hipd
> >
> > Why?
> 
> I get compile errors without it. I can't find a libdht directory neither in
> midauth nor in midauth2.

I'm getting concerned by the HIP dependencies that are burrowing
themselves deeper and deeper into the PISA codebase.

IIRC libdht was renamed to opendht in HIP at some point?  I'm speaking
from very faint memory here, so I'm likely confusing things.

> > @@ -78,110 +118,223 @@
> > >
> > > -     if (!(conn = pisa_hitlist_find(allowed, hit)))
> > > +     if (!(conn = pisa_hitlist_find(allowed, hit))) {
> > > +             *reason = DENY_HIT_NOT_ALLOWED;
> > >               return NULL;
> > > -     if (conn->expiration < not_before)
> > > +     }
> > > +     if (conn->expiration < not_before) {
> > > +             *reason = DENY_HIT_EXPIRED;
> > >               return NULL;
> > > -     if (conn->expiration < not_after)
> > > +     }
> > > +     if (conn->expiration < not_after) {
> > >               not_after = conn->expiration;
> > > +     }
> >
> > It seems that this mostly adds useless curly braces.  The addition of
> > the curly braces mixed in with everything else does make the diff hard
> > to read though.
> 
> There are now two actions within the curly braces, so they are needed maybe
> except the last one.

I missed that for the second if statement.  So forget what I said, I'm
blind.

Diego

Other related posts: