[tbnl-devel] Re: [mod-lisp-devel] Apache 2 support

Marc Battyani marc.battyani at fractalconcept.com
Thu Nov 11 11:58:22 UTC 2004


"Edi Weitz" <edi at agharta.de> wrote:

> On Thu, 11 Nov 2004 12:33:08 +0100, "Marc Battyani"
<marc.battyani at fractalconcept.com> wrote:
>
> > Now what is needed is to test it (and fix it ;-) If you could test
> > it on Linux while I debug it on Windows it would be cool.
>
> Your version fails if multiple Lisp images are running - it re-uses
> the socket although it shouldn't. That's why I have the lisp_private_t
> structure in my code.

No. The check_cfg_for_reuse will mark the socket as unsafe if it's not the
same lisp image.
It's just that I forgot to call it. :(
It should be called like this:

local_lisp_cfg (lisp_cfg_t *cfg)
{
  lisp_cfg_t *local_cfg = NULL;

  apr_threadkey_private_get((void**)&local_cfg, cfg_key);
  if (local_cfg == NULL)
    {
      local_cfg = copy_lisp_cfg (socket_pool, cfg);
      apr_threadkey_private_set((void*)local_cfg, cfg_key);
      return local_cfg;
    }

  check_cfg_for_reuse(local_cfg, cfg);
  return local_cfg;
}

Cheers,

Marc





More information about the Tbnl-devel mailing list