src/stored/vol_mgr.c
VOLRES *vol_walk_next(VOLRES *prev_vol)
{
   VOLRES *vol;

   lock_volumes();
   vol = (VOLRES *)vol_list->next(prev_vol);
   if (vol) {
      vol->inc_use_count();
      Dmsg2(dbglvl, "Inc walk_next use_count=%d volname=%s\n",
            vol->use_count(), vol->vol_name);
   }
   if (prev_vol) {
      free_vol_item(prev_vol);
   }
   unlock_volumes();
   return vol;
}
/*
 * Get next vol from chain, and release current one
 */
Get next vol from chain, and release current one
Get next vol from chain and release current one
VOLRES *vol_walk_next(VOLRES *prev_vol)
{
   VOLRES *vol;
   lock_volumes();
   vol = (VOLRES *)vol_list->next(prev_vol);
   if (vol) {
      vol->inc_use_count();
      Dmsg2(dbglvl, "Inc walk_next use_count=%d volname=%s\n",
            vol->use_count(), vol->vol_name);
   }
   if (prev_vol) {
      free_vol_item(prev_vol);
   }
   unlock_volumes();
   return vol;
}
VOLRES * vol_walk_next ( VOLRES * prev_vol ) { VOLRES * vol ; lock_volumes ( ) ; vol = ( VOLRES * ) vol_list -> next ( prev_vol ) ; if ( vol ) { vol -> inc_use_count ( ) ; Dmsg2 ( dbglvl , " \n " , vol -> use_count ( ) , vol -> vol_name ) ; } if ( prev_vol ) { free_vol_item ( prev_vol ) ; } unlock_volumes ( ) ; return vol ; }
Get next vol from chain, and release current one
Get next vol from chain and release current one