X-Git-Url: https://git.distorted.org.uk/~mdw/fwd/blobdiff_plain/03a839ce52510443ef1a1fe8b3629884423099fe..755e6619263d316dc46fa504e0c333c963ec8eaa:/identify.c diff --git a/identify.c b/identify.c index 13c81bd..e099fb9 100644 --- a/identify.c +++ b/identify.c @@ -5,57 +5,26 @@ * (c) 1999 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * - * This file is part of the `fw' port forwarder. + * This file is part of the `fwd' port forwarder. * - * `fw' is free software; you can redistribute it and/or modify + * `fwd' is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * - * `fw' is distributed in the hope that it will be useful, + * + * `fwd' is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License - * along with `fw'; if not, write to the Free Software Foundation, + * along with `fwd'; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/*----- Header files ------------------------------------------------------*/ - -#include "config.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "fw.h" -#include "identify.h" +#include "fwd.h" /*----- Magic numbers -----------------------------------------------------*/ @@ -113,6 +82,7 @@ static void id_done(id *i) /* --- Dispose of the block --- */ REFFD_DEC(i->q.r); + xfree((/*unconst*/ char *)i->q.desc); xfree(i); } @@ -197,6 +167,7 @@ void identify(const id_req *q) i = xmalloc(sizeof(*i)); i->q = *q; + i->q.desc = xstrdup(q->desc); REFFD_INC(i->q.r); str_sanitize(i->host, inet_ntoa(q->rsin.sin_addr), sizeof(i->host));