1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-10-28 04:46:17 +00:00

removed Resolve_SUCCESS() Macro and Res_Stat->sucess boolean (no longer used/needed)

This commit is contained in:
Florian Westphal 2006-02-08 15:24:10 +00:00
parent a17745d6d7
commit 0701afedee
2 changed files with 2 additions and 8 deletions

View File

@ -14,7 +14,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: resolve.c,v 1.22 2006/02/08 15:20:21 fw Exp $";
static char UNUSED id[] = "$Id: resolve.c,v 1.23 2006/02/08 15:24:10 fw Exp $";
#include "imp.h"
#include <assert.h>
@ -83,7 +83,6 @@ Resolve_Addr( RES_STAT *s, struct sockaddr_in *Addr, int identsock, void (*cbfun
/* Resolve IP (asynchronous!). */
int pid, pipefd[2];
assert(s != NULL);
s->success = false;
pid = Resolver_fork(pipefd);
if (pid > 0) {
@ -109,7 +108,6 @@ Resolve_Name( RES_STAT *s, const char *Host, void (*cbfunc)(int, short))
/* Resolve hostname (asynchronous!). */
int pid, pipefd[2];
assert(s != NULL);
s->success = false;
pid = Resolver_fork(pipefd);
if (pid > 0) {
@ -136,7 +134,6 @@ Resolve_Init(RES_STAT *s)
assert(s != NULL);
s->resolver_fd = -1;
s->pid = 0;
/* s->success must not be changed -- it will be set by other Resolve_*() functions */
}
@ -356,7 +353,6 @@ Resolve_Read( RES_STAT *s, void* readbuf, size_t buflen)
return 0;
}
s->success = true;
return bytes_read;
}
/* -eof- */

View File

@ -8,7 +8,7 @@
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
*
* $Id: resolve.h,v 1.11 2005/09/12 19:10:21 fw Exp $
* $Id: resolve.h,v 1.12 2006/02/08 15:24:10 fw Exp $
*
* Asynchronous resolver (header)
*/
@ -24,13 +24,11 @@
typedef struct _Res_Stat {
int pid; /* PID of resolver process */
int resolver_fd; /* pipe fd for lookup result. */
bool success; /* resolver returned data */
} RES_STAT;
#define Resolve_Getfd(x) ((x)->resolver_fd)
#define Resolve_INPROGRESS(x) ((x)->resolver_fd >= 0)
#define Resolve_SUCCESS(x) ((x)->resolver_fd < 0 && (x)->success)
GLOBAL bool Resolve_Addr PARAMS(( RES_STAT *s, struct sockaddr_in *Addr, int identsock, void (*cbfunc)(int, short)));
GLOBAL bool Resolve_Name PARAMS(( RES_STAT *s, const char *Host, void (*cbfunc)(int, short) ));