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

   /* Only a copy job is allowed */
   if (jcr->getJobType() != JT_COPY) {
      Jmsg(jcr, M_FATAL, 0,
           _("Selection Type 'pooluncopiedjobs' only applies to Copy Jobs"));
      goto bail_out;
   }

   Dmsg1(dbglevel, "copy selection pattern=%s\n", jcr->rpool->name());
   Mmsg(query, sql_jobids_of_pool_uncopied_jobs, jcr->rpool->name());
   Dmsg1(dbglevel, "get uncopied jobs query=%s\n", query.c_str());
   if (!db_sql_query(jcr->db, query.c_str(), unique_dbid_handler, (void *)ids)) {
      Jmsg(jcr, M_FATAL, 0,
           _("SQL to get uncopied jobs failed. ERR=%s\n"), db_strerror(jcr->db));
      goto bail_out;
   }
   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_of_pool_uncopied_jobs(JCR *jcr, idpkt *ids)
{
   bool ok = false;
   POOL_MEM query(PM_MESSAGE);
   if (jcr->getJobType() != JT_COPY) {
      Jmsg(jcr, M_FATAL, 0,
           _("Selection Type 'pooluncopiedjobs' only applies to Copy Jobs"));
      goto bail_out;
   }
   Dmsg1(dbglevel, "copy selection pattern=%s\n", jcr->rpool->name());
   Mmsg(query, sql_jobids_of_pool_uncopied_jobs, jcr->rpool->name());
   Dmsg1(dbglevel, "get uncopied jobs query=%s\n", query.c_str());
   if (!db_sql_query(jcr->db, query.c_str(), unique_dbid_handler, (void *)ids)) {
      Jmsg(jcr, M_FATAL, 0,
           _("SQL to get uncopied jobs failed. ERR=%s\n"), db_strerror(jcr->db));
      goto bail_out;
   }
   ok = true;
bail_out:
   return ok;
}
static bool find_jobids_of_pool_uncopied_jobs ( JCR * jcr , idpkt * ids ) { bool ok = false ; POOL_MEM query ( PM_MESSAGE ) ; if ( jcr -> getJobType ( ) != JT_COPY ) { Jmsg ( jcr , M_FATAL , 0 , _ ( " " ) ) ; goto bail_out ; } Dmsg1 ( dbglevel , " \n " , jcr -> rpool -> name ( ) ) ; Mmsg ( query , sql_jobids_of_pool_uncopied_jobs , jcr -> rpool -> name ( ) ) ; Dmsg1 ( dbglevel , " \n " , query . c_str ( ) ) ; 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 ; } 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 )
/* Only a copy job is allowed */