src/dird/mac_sql.c
static bool find_jobids_from_mediaid_list(JCR *jcr, idpkt *ids, const char *type)
{
   bool ok = false;
   POOL_MEM query(PM_MESSAGE);

   Mmsg(query, sql_jobids_from_mediaid, ids->list);
   ids->count = 0;
   if (!db_sql_query(jcr->db, query.c_str(), unique_dbid_handler, (void *)ids)) {
      Jmsg(jcr, M_FATAL, 0, _("SQL failed. ERR=%s\n"), db_strerror(jcr->db));
      goto bail_out;
   }
   if (ids->count == 0) {
      Jmsg(jcr, M_INFO, 0, _("No %ss found to %s.\n"), type, jcr->get_ActionName(0));
   }
   ok = true;

bail_out:
   return ok;
}
/*
 * This routine returns:
 *    false       if an error occurred
 *    true        otherwise
 *    ids.count   number of jobids found (may be zero)
 */
This routine returns:
false       if an error occurred
true        otherwise
ids.count   number of jobids found (may be zero)
This routine returns : false if an error occurred true otherwise ids . count number of jobids found ( may be zero )
static bool find_jobids_from_mediaid_list(JCR *jcr, idpkt *ids, const char *type)
{
   bool ok = false;
   POOL_MEM query(PM_MESSAGE);
   Mmsg(query, sql_jobids_from_mediaid, ids->list);
   ids->count = 0;
   if (!db_sql_query(jcr->db, query.c_str(), unique_dbid_handler, (void *)ids)) {
      Jmsg(jcr, M_FATAL, 0, _("SQL failed. ERR=%s\n"), db_strerror(jcr->db));
      goto bail_out;
   }
   if (ids->count == 0) {
      Jmsg(jcr, M_INFO, 0, _("No %ss found to %s.\n"), type, jcr->get_ActionName(0));
   }
   ok = true;
bail_out:
   return ok;
}
static bool find_jobids_from_mediaid_list ( JCR * jcr , idpkt * ids , const char * type ) { bool ok = false ; POOL_MEM query ( PM_MESSAGE ) ; Mmsg ( query , sql_jobids_from_mediaid , ids -> list ) ; ids -> count = 0 ; if ( ! db_sql_query ( jcr -> db , query . c_str ( ) , unique_dbid_handler , ( void * ) ids ) ) { Jmsg ( jcr , M_FATAL , 0 , _ ( " \n " ) , db_strerror ( jcr -> db ) ) ; goto bail_out ; } if ( ids -> count == 0 ) { Jmsg ( jcr , M_INFO , 0 , _ ( " \n " ) , type , jcr -> get_ActionName ( 0 ) ) ; } ok = true ; bail_out : return ok ; }
This routine returns:
    false       if an error occurred
    true        otherwise
    ids.count   number of jobids found (may be zero)
This routine returns : false if an error occurred true otherwise ids . count number of jobids found ( may be zero )