~mdw
/
mLib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support `make -j' building.
[mLib]
/
bres.c
diff --git
a/bres.c
b/bres.c
index
c482262
..
4971153
100644
(file)
--- a/
bres.c
+++ b/
bres.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: bres.c,v 1.
1 1999/10/04 21:40:42
mdw Exp $
+ * $Id: bres.c,v 1.
3 2000/06/17 10:38:35
mdw Exp $
*
* Background reverse name resolution
*
*
* Background reverse name resolution
*
@@
-30,6
+30,12
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: bres.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: bres.c,v $
+ * Revision 1.3 2000/06/17 10:38:35 mdw
+ * Track changes to selbuf interface.
+ *
+ * Revision 1.2 1999/10/30 11:28:39 mdw
+ * Fix include error, pointed out by Chris Rutter.
+ *
* Revision 1.1 1999/10/04 21:40:42 mdw
* Added background resolver from `fw'.
*
* Revision 1.1 1999/10/04 21:40:42 mdw
* Added background resolver from `fw'.
*
@@
-53,11
+59,10
@@
#include <arpa/inet.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <netdb.h>
-#include <mLib/alloc.h>
-#include <mLib/report.h>
-#include <mLib/sel.h>
-
+#include "alloc.h"
#include "bres.h"
#include "bres.h"
+#include "report.h"
+#include "sel.h"
/*----- Magic numbers -----------------------------------------------------*/
/*----- Magic numbers -----------------------------------------------------*/
@@
-314,15
+319,15
@@
static struct hostent *gethost(int fd)
h->h_name = a;
PUT(name);
h->h_name = a;
PUT(name);
- free(name);
+
x
free(name);
h->h_aliases = p;
for (i = 0; i < hsk.nalias; i++) {
*p++ = a;
PUT(alias[i]);
h->h_aliases = p;
for (i = 0; i < hsk.nalias; i++) {
*p++ = a;
PUT(alias[i]);
- free(alias[i]);
+
x
free(alias[i]);
}
*p++ = 0;
}
*p++ = 0;
- free(alias);
+
x
free(alias);
#undef PUT
}
#undef PUT
}
@@
-335,11
+340,11
@@
tidy_2:
{
int i;
for (i = 0; i < hsk.nalias && alias[i]; i++)
{
int i;
for (i = 0; i < hsk.nalias && alias[i]; i++)
- free(alias[i]);
- free(alias);
+
x
free(alias[i]);
+
x
free(alias);
}
tidy_1:
}
tidy_1:
- free(name);
+
x
free(name);
tidy_0:
return (0);
}
tidy_0:
return (0);
}
@@
-594,7
+599,7
@@
static void zap(bres_server *rs)
void bres_abort(bres_client *rc)
{
if (rc->q == BRES_BYNAME)
void bres_abort(bres_client *rc)
{
if (rc->q == BRES_BYNAME)
- free(rc->u.name);
+
x
free(rc->u.name);
if (rc->rs) {
sel_rmfile(&rc->rs->f);
zap(rc->rs);
if (rc->rs) {
sel_rmfile(&rc->rs->f);
zap(rc->rs);
@@
-661,10
+666,10
@@
static void answer(int fd, unsigned mode, void *vp)
if (rc) {
rc->func(h, rc->p);
if (rc->q == BRES_BYNAME)
if (rc) {
rc->func(h, rc->p);
if (rc->q == BRES_BYNAME)
- free(rc->u.name);
+
x
free(rc->u.name);
}
if (h)
}
if (h)
- free(h);
+
x
free(h);
if (fail)
zap(rs);
if (!rc)
if (fail)
zap(rs);
if (!rc)
@@
-852,7
+857,7
@@
again:
lost:
rc->func(0, rc->p);
if (rc->q == BRES_BYNAME)
lost:
rc->func(0, rc->p);
if (rc->q == BRES_BYNAME)
- free(rc->u.name);
+
x
free(rc->u.name);
}
/* --- @resolve@ --- *
}
/* --- @resolve@ --- *