src/stored/reserve.c
void send_drive_reserve_messages(JCR *jcr, void sendit(const char *msg, int len, void *sarg), void *arg)
{
   int i;
   alist *msgs;
   char *msg;

   jcr->lock();
   msgs = jcr->reserve_msgs;
   if (!msgs || msgs->size() == 0) {
      goto bail_out;
   }
   for (i=msgs->size()-1; i >= 0; i--) {
      msg = (char *)msgs->get(i);
      if (msg) {
         sendit("   ", 3, arg);
         sendit(msg, strlen(msg), arg);
      } else {
         break;
      }
   }

bail_out:
   jcr->unlock();
}
/*
 * Send any reservation messages queued for this jcr
 */
Send any reservation messages queued for this jcr
Send any reservation messages queued for this jcr
void send_drive_reserve_messages(JCR *jcr, void sendit(const char *msg, int len, void *sarg), void *arg)
{
   int i;
   alist *msgs;
   char *msg;
   jcr->lock();
   msgs = jcr->reserve_msgs;
   if (!msgs || msgs->size() == 0) {
      goto bail_out;
   }
   for (i=msgs->size()-1; i >= 0; i--) {
      msg = (char *)msgs->get(i);
      if (msg) {
         sendit("   ", 3, arg);
         sendit(msg, strlen(msg), arg);
      } else {
         break;
      }
   }
bail_out:
   jcr->unlock();
}
void send_drive_reserve_messages ( JCR * jcr , void sendit ( const char * msg , int len , void * sarg ) , void * arg ) { int i ; alist * msgs ; char * msg ; jcr -> lock ( ) ; msgs = jcr -> reserve_msgs ; if ( ! msgs || msgs -> size ( ) == 0 ) { goto bail_out ; } for ( i = msgs -> size ( ) - 1 ; i >= 0 ; i -- ) { msg = ( char * ) msgs -> get ( i ) ; if ( msg ) { sendit ( " " , 3 , arg ) ; sendit ( msg , strlen ( msg ) , arg ) ; } else { break ; } } bail_out : jcr -> unlock ( ) ; }
Send any reservation messages queued for this jcr
Send any reservation messages queued for this jcr