X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/a0751c36f04d55cc74c050b692a67701fe210262..8656dc507aee9c5dcb3a6ad876565f5fcac425ae:/ident.c diff --git a/ident.c b/ident.c index 4d8888f..52d4542 100644 --- a/ident.c +++ b/ident.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: ident.c,v 1.3 2000/10/08 11:17:45 mdw Exp $ + * $Id: ident.c,v 1.6 2004/04/08 01:36:11 mdw Exp $ * * Nonblocking RFC931 client * @@ -27,20 +27,6 @@ * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: ident.c,v $ - * Revision 1.3 2000/10/08 11:17:45 mdw - * (ident_socket): change sizes to be @size_t@. - * - * Revision 1.2 2000/06/17 10:38:35 mdw - * Track changes to selbuf interface. - * - * Revision 1.1 1999/10/04 21:41:58 mdw - * Added ident client from `fw'. - * - */ - /*----- Header files ------------------------------------------------------*/ #include @@ -162,6 +148,7 @@ static void parse(char *p, ident_reply *i) /* --- @line@ --- * * * Arguments: @char *s@ = pointer to string from ident server + * @size_t len@ = length of the line * @void *p@ = pointer to my request block * * Returns: --- @@ -169,7 +156,7 @@ static void parse(char *p, ident_reply *i) * Use: Handles a string from an ident server. */ -static void line(char *s, void *p) +static void line(char *s, size_t len, void *p) { ident_request *rq = p; @@ -295,8 +282,9 @@ static void go(ident_request *rq) sin.sin_family = AF_INET; sin.sin_port = htons(113); sin.sin_addr = rq->remote.sin_addr; - conn_init(&rq->c, rq->s, fd, (struct sockaddr *)&sin, sizeof(sin), - connected, rq); + if (conn_init(&rq->c, rq->s, fd, (struct sockaddr *)&sin, sizeof(sin), + connected, rq)) + goto fail_1; /* --- Finish off initializing the block --- */