* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
* mLib 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 Library General Public License for more details.
* mLib 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 Library General Public License for more details.
* You should have received a copy of the GNU Library General Public
* License along with mLib; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*/
* You should have received a copy of the GNU Library General Public
* License along with mLib; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: ident.c,v $
- * 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'.
- *
- */
-
if ((fd = socket(PF_INET, SOCK_STREAM, 0)) < 0)
goto fail_0;
memset(&sin, 0, sizeof(sin));
if ((fd = socket(PF_INET, SOCK_STREAM, 0)) < 0)
goto fail_0;
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_port = htons(113);
sin.sin_addr = rq->remote.sin_addr;
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;
void ident(ident_request *rq, sel_state *s,
const struct sockaddr_in *local,
void ident(ident_request *rq, sel_state *s,
const struct sockaddr_in *local,
if ((sinsz = sizeof(struct sockaddr_in),
getsockname(sk, (struct sockaddr *)&rq->local, &sinsz)) ||
(sinsz = sizeof(struct sockaddr_in),
if ((sinsz = sizeof(struct sockaddr_in),
getsockname(sk, (struct sockaddr *)&rq->local, &sinsz)) ||
(sinsz = sizeof(struct sockaddr_in),