&& debug_level > 0)
&& __builtin_expect (debug_level, 0) > 0)
handle_request (int fd, request_header *req, void *key, uid_t uid){  if (debug_level > 0)    dbg_log (_("handle_request: request received (Version = %d)"),	     req->version);  if (req->version != NSCD_VERSION)    {      if (debug_level > 0)	dbg_log (_("\cannot handle old request version %d; current version is %d"),		 req->version, NSCD_VERSION);      return;    }  if (req->type >= GETPWBYNAME && req->type <= LASTDBREQ)    {      struct hashentry *cached;      struct database *db = &dbs[serv2db[req->type]];      if (debug_level > 0)	{	  if (req->type == GETHOSTBYADDR || req->type == GETHOSTBYADDRv6)	    {	      char buf[INET6_ADDRSTRLEN];	      dbg_log ("\t%s (%s)", serv2str[req->type],		       inet_ntop (req->type == GETHOSTBYADDR				  ? AF_INET : AF_INET6,				  key, buf, sizeof (buf)));	    }	  else	    dbg_log ("\t%s (%s)", serv2str[req->type], (char *)key);	}      /* Is this service enabled?  */      if (!db->enabled)	{	  /* No, sent the prepared record.  */	  if (TEMP_FAILURE_RETRY (write (fd, db->disabled_iov->iov_base,					 db->disabled_iov->iov_len))	      != db->disabled_iov->iov_len	      && debug_level > 0)	    {	      /* We have problems sending the result.  */	      char buf[256];	      dbg_log (_("cannot write result: %s"),		       strerror_r (errno, buf, sizeof (buf)));	    }	  return;	}      /* Be sure we can read the data.  */      pthread_rwlock_rdlock (&db->lock);      /* See whether we can handle it from the cache.  */      cached = (struct hashentry *) cache_search (req->type, key, req->key_len,						  db, uid);      if (cached != NULL)	{	  /* Hurray it's in the cache.  */	  if (TEMP_FAILURE_RETRY (write (fd, cached->packet, cached->total))	      != cached->total	      && debug_level > 0)	    {	      /* We have problems sending the result.  */	      char buf[256];	      dbg_log (_("cannot write result: %s"),		       strerror_r (errno, buf, sizeof (buf)));	    }	  pthread_rwlock_unlock (&db->lock);	  return;	}      pthread_rwlock_unlock (&db->lock);    }  else if (debug_level > 0)    {      if (req->type == INVALIDATE)	dbg_log ("\t%s (%s)", serv2str[req->type], (char *)key);      else	dbg_log ("\t%s", serv2str[req->type]);    }  /* Handle the request.  */  switch (req->type)    {    case GETPWBYNAME:      addpwbyname (&dbs[serv2db[req->type]], fd, req, key, uid);      break;    case GETPWBYUID:      addpwbyuid (&dbs[serv2db[req->type]], fd, req, key, uid);      break;    case GETGRBYNAME:      addgrbyname (&dbs[serv2db[req->type]], fd, req, key, uid);      break;    case GETGRBYGID:      addgrbygid (&dbs[serv2db[req->type]], fd, req, key, uid);      break;    case GETHOSTBYNAME:      addhstbyname (&dbs[serv2db[req->type]], fd, req, key, uid);      break;    case GETHOSTBYNAMEv6:      addhstbynamev6 (&dbs[serv2db[req->type]], fd, req, key, uid);      break;    case GETHOSTBYADDR:      addhstbyaddr (&dbs[serv2db[req->type]], fd, req, key, uid);      break;    case GETHOSTBYADDRv6:      addhstbyaddrv6 (&dbs[serv2db[req->type]], fd, req, key, uid);      break;    case GETSTAT:    case SHUTDOWN:    case INVALIDATE:      /* Accept shutdown, getstat and invalidate only from root */      if (secure_in_use && uid == 0)	{	  if (req->type == GETSTAT)	    send_stats (fd, dbs);	  else if (req->type == INVALIDATE)	    invalidate_cache (key);	  else	    termination_handler (0);	}      else	{	  struct ucred caller;	  socklen_t optlen = sizeof (caller);	  /* Some systems have no SO_PEERCRED implementation.  They don't	     care about security so we don't as well.  */#ifdef SO_PEERCRED	  if (getsockopt (fd, SOL_SOCKET, SO_PEERCRED, &caller, &optlen) < 0)	    {	      char buf[256];	      dbg_log (_("error getting callers id: %s"),		       strerror_r (errno, buf, sizeof (buf)));	    }	  else	    if (caller.uid == 0)#endif	      {		if (req->type == GETSTAT)		  send_stats (fd, dbs);		else if (req->type == INVALIDATE)		  invalidate_cache (key);		else		  termination_handler (0);	      }	}      break;    default:      /* Ignore the command, it's nothing we know.  */      break;    }}