src/dird/ua_restore.c
static int jobid_fileindex_handler(void *ctx, int num_fields, char **row)
{
   RESTORE_CTX *rx = (RESTORE_CTX *)ctx;
   JobId_t JobId = str_to_int64(row[0]);

   Dmsg3(200, "JobId=%s JobIds=%s FileIndex=%s\n", row[0], rx->JobIds, row[1]);

   /* New JobId, add it to JobIds
    * The list is sorted by JobId, so we need a cache for the previous value
    *
    * It will permit to find restore objects to send during the restore
    */
   if (rx->JobId != JobId) {
      if (*rx->JobIds) {
         pm_strcat(rx->JobIds, ",");
      }
      pm_strcat(rx->JobIds, row[0]);
      rx->JobId = JobId;
   }

   add_findex(rx->bsr_list, rx->JobId, str_to_int64(row[1]));
   rx->found = true;
   rx->selected_files++;
   return 0;
}
/*
 * Callback handler to get JobId and FileIndex for files
 *   can insert more than one depending on the caller.
 */
Callback handler to get JobId and FileIndex for files
can insert more than one depending on the caller.
Callback handler to get JobId and FileIndex for files can insert more than one depending on the caller .
static int jobid_fileindex_handler(void *ctx, int num_fields, char **row)
{
   RESTORE_CTX *rx = (RESTORE_CTX *)ctx;
   JobId_t JobId = str_to_int64(row[0]);
   Dmsg3(200, "JobId=%s JobIds=%s FileIndex=%s\n", row[0], rx->JobIds, row[1]);
   if (rx->JobId != JobId) {
      if (*rx->JobIds) {
         pm_strcat(rx->JobIds, ",");
      }
      pm_strcat(rx->JobIds, row[0]);
      rx->JobId = JobId;
   }
   add_findex(rx->bsr_list, rx->JobId, str_to_int64(row[1]));
   rx->found = true;
   rx->selected_files++;
   return 0;
}
static int jobid_fileindex_handler ( void * ctx , int num_fields , char * * row ) { RESTORE_CTX * rx = ( RESTORE_CTX * ) ctx ; JobId_t JobId = str_to_int64 ( row [ 0 ] ) ; Dmsg3 ( 200 , " \n " , row [ 0 ] , rx -> JobIds , row [ 1 ] ) ; if ( rx -> JobId != JobId ) { if ( * rx -> JobIds ) { pm_strcat ( rx -> JobIds , " " ) ; } pm_strcat ( rx -> JobIds , row [ 0 ] ) ; rx -> JobId = JobId ; } add_findex ( rx -> bsr_list , rx -> JobId , str_to_int64 ( row [ 1 ] ) ) ; rx -> found = true ; rx -> selected_files ++ ; return 0 ; }
Callback handler to get JobId and FileIndex for files
   can insert more than one depending on the caller.
Callback handler to get JobId and FileIndex for files can insert more than one depending on the caller .
/* New JobId, add it to JobIds
    * The list is sorted by JobId, so we need a cache for the previous value
    *
    * It will permit to find restore objects to send during the restore
    */