/* -*-c-*-
*
- * $Id: identify.c,v 1.6 2001/06/22 19:36:49 mdw Exp $
+ * $Id: identify.c,v 1.11 2004/04/08 01:36:25 mdw Exp $
*
* Identifies and logs the client of a connection
*
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: identify.c,v $
- * Revision 1.6 2001/06/22 19:36:49 mdw
- * Enlarge the identity buffer.
- *
- * Revision 1.5 1999/10/10 16:45:34 mdw
- * Modified to use new mLib resolver and ident client.
- *
- * Revision 1.4 1999/07/27 18:30:53 mdw
- * Various minor portability fixes.
- *
- * Revision 1.3 1999/07/26 23:26:21 mdw
- * Minor modifications for new design.
- *
- * Revision 1.2 1999/07/03 13:56:59 mdw
- * Log connections to syslog or stderr as appropriate.
- *
- * Revision 1.1.1.1 1999/07/01 08:56:23 mdw
- * Initial revision.
- *
- */
-
/*----- Header files ------------------------------------------------------*/
#include "config.h"
/* --- Report the final result --- */
- fw_log(i->when, "[%s] %s from %s@%s [%s]",
+ fw_log(i->when, "[%s] %s from %s@%s [%s:%u]",
i->q.desc, i->q.act,
- i->user, i->host, inet_ntoa(i->q.rsin.sin_addr));
+ i->user, i->host,
+ inet_ntoa(i->q.rsin.sin_addr), (unsigned)ntohs(i->q.rsin.sin_port));
/* --- Dispose of the block --- */
REFFD_DEC(i->q.r);
- free(i);
+ xfree(i);
}
/* --- @id_res@ --- *
static void id_timer(struct timeval *tv, void *vp)
{
id *i = vp;
+ i->state |= S_TIMER;
id_done(i);
}