src/stored/fd_cmds.c
static bool response(JCR *jcr, BSOCK *bs, const char *resp, const char *cmd)
{
   int n;

   if (bs->is_error()) {
      return false;
   }
   if ((n = bs->recv()) >= 0) {
      if (strcmp(bs->msg, resp) == 0) {
         return true;
      }
      Jmsg(jcr, M_FATAL, 0, _("Bad response to %s command: wanted %s, got %s\n"),
            cmd, resp, bs->msg);
      return false;
   }
   Jmsg(jcr, M_FATAL, 0, _("Socket error on %s command: ERR=%s\n"),
         cmd, bs->bstrerror());
   return false;
}
/*
 * Get response from FD or SD
 * sent. Check that the response agrees with what we expect.
 *
 *  Returns: false on failure
 *           true  on success
 */
Get response from FD or SD
sent. Check that the response agrees with what we expect.

false on failure
true  on success
Get response from FD or SD sent . Check that the response agrees with what we expect . false on failure true on success
static bool response(JCR *jcr, BSOCK *bs, const char *resp, const char *cmd)
{
   int n;
   if (bs->is_error()) {
      return false;
   }
   if ((n = bs->recv()) >= 0) {
      if (strcmp(bs->msg, resp) == 0) {
         return true;
      }
      Jmsg(jcr, M_FATAL, 0, _("Bad response to %s command: wanted %s, got %s\n"),
            cmd, resp, bs->msg);
      return false;
   }
   Jmsg(jcr, M_FATAL, 0, _("Socket error on %s command: ERR=%s\n"),
         cmd, bs->bstrerror());
   return false;
}
static bool response ( JCR * jcr , BSOCK * bs , const char * resp , const char * cmd ) { int n ; if ( bs -> is_error ( ) ) { return false ; } if ( ( n = bs -> recv ( ) ) >= 0 ) { if ( strcmp ( bs -> msg , resp ) == 0 ) { return true ; } Jmsg ( jcr , M_FATAL , 0 , _ ( " \n " ) , cmd , resp , bs -> msg ) ; return false ; } Jmsg ( jcr , M_FATAL , 0 , _ ( " \n " ) , cmd , bs -> bstrerror ( ) ) ; return false ; }
Get response from FD or SD
 sent.
Get response from FD or SD sent .