summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypserv/yp_dblookup.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-12-23 21:35:35 +0000
committerwpaul <wpaul@FreeBSD.org>1995-12-23 21:35:35 +0000
commit3be99a55ffecd32ecfa45a807b33d45bf2a13178 (patch)
treece4c9de08d67a611ebd2b072d1809f830327a6b7 /usr.sbin/ypserv/yp_dblookup.c
parent6ef4e82f0f2c507c27c3787fb8e0d899e2dbadca (diff)
downloadFreeBSD-src-3be99a55ffecd32ecfa45a807b33d45bf2a13178.zip
FreeBSD-src-3be99a55ffecd32ecfa45a807b33d45bf2a13178.tar.gz
A few small tweaks related to ypxfr:
- Add a ypxfr_callback() function that we can use to signal failure to yppush(8) in the event that we can't fork()/exec() ypxfr(8). yppush only checks the return status from YPPROC_XFR enough to determine that the RPC succeded: it relies on its callback service to figure out whether or not the transfer actually worked. - Give yp_dblookup.c its own debug variable (ypdb_debug) so that DB access debugging messages can be turned on or off independent of the program's global debug messages. - Have the Makefile rpcgen the ypushresp_xfr_1() client stub for us and nuke the unneeded rule for yp_xdr.c that I left in by mistake (the XDR filters live in libc now).
Diffstat (limited to 'usr.sbin/ypserv/yp_dblookup.c')
-rw-r--r--usr.sbin/ypserv/yp_dblookup.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/ypserv/yp_dblookup.c b/usr.sbin/ypserv/yp_dblookup.c
index 79df52e..b35c64f 100644
--- a/usr.sbin/ypserv/yp_dblookup.c
+++ b/usr.sbin/ypserv/yp_dblookup.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: yp_dblookup.c,v 1.13 1995/12/16 04:46:10 wpaul Exp $
+ * $Id: yp_dblookup.c,v 1.1.1.1 1995/12/16 20:54:17 wpaul Exp $
*
*/
#include <stdio.h>
@@ -45,7 +45,7 @@
#include "yp.h"
#include "yp_extern.h"
-extern int debug_flag;
+int ypdb_debug = 0;
int yp_errno = YP_TRUE;
#define PERM_SECURE (S_IRUSR|S_IWUSR)
@@ -118,7 +118,7 @@ int yp_get_record(domain,map,key,data,allow)
{
DB *dbp;
- if (debug)
+ if (ypdb_debug)
yp_error("Looking up key [%.*s] in map [%s]",
key->size, key->data, map);
@@ -141,7 +141,7 @@ int yp_get_record(domain,map,key,data,allow)
(void)(dbp->close)(dbp);
- if (debug)
+ if (ypdb_debug)
yp_error("Result of lookup: key: [%.*s] data: [%.*s]",
key->size, key->data, data->size, data->data);
@@ -154,7 +154,7 @@ int yp_first_record(dbp,key,data)
DBT *data;
{
- if (debug)
+ if (ypdb_debug)
yp_error("Retrieving first key in map.");
if ((dbp->seq)(dbp,key,data,R_FIRST))
@@ -166,7 +166,7 @@ int yp_first_record(dbp,key,data)
return(YP_BADDB);
}
- if (debug)
+ if (ypdb_debug)
yp_error("Result of lookup: key: [%.*s] data: [%.*s]",
key->size, key->data, data->size, data->data);
@@ -184,7 +184,7 @@ int yp_next_record(dbp,key,data,all)
if (key == NULL || key->data == NULL)
return(yp_first_record(dbp,key,data));
- if (debug)
+ if (ypdb_debug)
yp_error("Retreiving next key, previous was: [%.*s]",
key->size, key->data);
@@ -209,7 +209,7 @@ int yp_next_record(dbp,key,data,all)
*key = lkey;
*data = ldata;
- if (debug)
+ if (ypdb_debug)
yp_error("Result of lookup: key: [%.*s] data: [%.*s]",
key->size, key->data, data->size, data->data);
OpenPOWER on IntegriCloud