src/dird/fd_cmds.c
bool send_component_info(JCR *jcr)
{
   BSOCK *fd;
   char buf[2000];
   bool ok = true;

   if (!jcr->component_fd) {
      return true;           /* nothing to send */
   }
   /* Don't send if old version FD */
   if (jcr->FDVersion < 6) {
      goto bail_out;
   }

   rewind(jcr->component_fd);
   fd = jcr->file_bsock;
   fd->fsend(component_info);
   while (fgets(buf, sizeof(buf), jcr->component_fd)) {
      fd->fsend("%s", buf);
      Dmsg1(050, "Send component_info to FD: %s\n", buf);
   }
   fd->signal(BNET_EOD);
   if (!response(jcr, fd, OKComponentInfo, "ComponentInfo", DISPLAY_ERROR)) {
      Jmsg(jcr, M_FATAL, 0, _("ComponentInfo failed.\n"));
      ok = false;
   }

bail_out:
   fclose(jcr->component_fd);
   jcr->component_fd = NULL;
   unlink(jcr->component_fname);
   free_and_null_pool_memory(jcr->component_fname);
   return ok;
}
/*
 * Send the plugin a list of component info files.  These
 *  were files that were created during the backup for
 *  the VSS plugin.  The list is a list of those component
 *  files that have been chosen for restore.  We
 *  send them before the Restore Objects.
 */
Send the plugin a list of component info files.  These
were files that were created during the backup for
the VSS plugin.  The list is a list of those component
files that have been chosen for restore.  We
send them before the Restore Objects.
Send the plugin a list of component info files . These were files that were created during the backup for the VSS plugin . The list is a list of those component files that have been chosen for restore . We send them before the Restore Objects .
bool send_component_info(JCR *jcr)
{
   BSOCK *fd;
   char buf[2000];
   bool ok = true;
   if (!jcr->component_fd) {
      return true;           
   }
   if (jcr->FDVersion < 6) {
      goto bail_out;
   }
   rewind(jcr->component_fd);
   fd = jcr->file_bsock;
   fd->fsend(component_info);
   while (fgets(buf, sizeof(buf), jcr->component_fd)) {
      fd->fsend("%s", buf);
      Dmsg1(050, "Send component_info to FD: %s\n", buf);
   }
   fd->signal(BNET_EOD);
   if (!response(jcr, fd, OKComponentInfo, "ComponentInfo", DISPLAY_ERROR)) {
      Jmsg(jcr, M_FATAL, 0, _("ComponentInfo failed.\n"));
      ok = false;
   }
bail_out:
   fclose(jcr->component_fd);
   jcr->component_fd = NULL;
   unlink(jcr->component_fname);
   free_and_null_pool_memory(jcr->component_fname);
   return ok;
}
bool send_component_info ( JCR * jcr ) { BSOCK * fd ; char buf [ 2000 ] ; bool ok = true ; if ( ! jcr -> component_fd ) { return true ; } if ( jcr -> FDVersion < 6 ) { goto bail_out ; } rewind ( jcr -> component_fd ) ; fd = jcr -> file_bsock ; fd -> fsend ( component_info ) ; while ( fgets ( buf , sizeof ( buf ) , jcr -> component_fd ) ) { fd -> fsend ( " " , buf ) ; Dmsg1 ( 050 , " \n " , buf ) ; } fd -> signal ( BNET_EOD ) ; if ( ! response ( jcr , fd , OKComponentInfo , " " , DISPLAY_ERROR ) ) { Jmsg ( jcr , M_FATAL , 0 , _ ( " \n " ) ) ; ok = false ; } bail_out : fclose ( jcr -> component_fd ) ; jcr -> component_fd = NULL ; unlink ( jcr -> component_fname ) ; free_and_null_pool_memory ( jcr -> component_fname ) ; return ok ; }
Send the plugin a list of component info files.
Send the plugin a list of component info files .
/* nothing to send */ /* Don't send if old version FD */