src/stored/vol_mgr.c
static VOLRES *find_volume(const char *VolumeName)
{
   VOLRES vol, *fvol;

   if (vol_list->empty()) {
      return NULL;
   }
   /* Do not lock reservations here */
   lock_volumes();
   vol.vol_name = bstrdup(VolumeName);
   fvol = (VOLRES *)vol_list->binary_search(&vol, name_compare);
   free(vol.vol_name);
   Dmsg2(dbglvl, "find_vol=%s found=%d\n", VolumeName, fvol!=NULL);
   debug_list_volumes("find_volume");
   unlock_volumes();
   return fvol;
}
/*
 * Search for a Volume name in the Volume list.
 *
 *  Returns: VOLRES entry on success
 *           NULL if the Volume is not in the list
 */
Search for a Volume name in the Volume list.
Returns: VOLRES entry on success
NULL if the Volume is not in the list
Search for a Volume name in the Volume list . Returns : VOLRES entry on success NULL if the Volume is not in the list
static VOLRES *find_volume(const char *VolumeName)
{
   VOLRES vol, *fvol;
   if (vol_list->empty()) {
      return NULL;
   }
   lock_volumes();
   vol.vol_name = bstrdup(VolumeName);
   fvol = (VOLRES *)vol_list->binary_search(&vol, name_compare);
   free(vol.vol_name);
   Dmsg2(dbglvl, "find_vol=%s found=%d\n", VolumeName, fvol!=NULL);
   debug_list_volumes("find_volume");
   unlock_volumes();
   return fvol;
}
static VOLRES * find_volume ( const char * VolumeName ) { VOLRES vol , * fvol ; if ( vol_list -> empty ( ) ) { return NULL ; } lock_volumes ( ) ; vol . vol_name = bstrdup ( VolumeName ) ; fvol = ( VOLRES * ) vol_list -> binary_search ( & vol , name_compare ) ; free ( vol . vol_name ) ; Dmsg2 ( dbglvl , " \n " , VolumeName , fvol != NULL ) ; debug_list_volumes ( " " ) ; unlock_volumes ( ) ; return fvol ; }
Search for a Volume name in the Volume list.
Search for a Volume name in the Volume list .
/* Do not lock reservations here */