src/stored/reserve.c
static void queue_reserve_message(JCR *jcr)
{
   int i;
   alist *msgs;
   char *msg;

   jcr->lock();

   msgs = jcr->reserve_msgs;
   if (!msgs) {
      goto bail_out;
   }
   /*
    * Look for duplicate message.  If found, do
    * not insert
    */
   for (i=msgs->size()-1; i >= 0; i--) {
      msg = (char *)msgs->get(i);
      if (!msg) {
         goto bail_out;
      }
      /* Comparison based on 4 digit message number */
      if (strncmp(msg, jcr->errmsg, 4) == 0) {
         goto bail_out;
      }
   }
   /* Message unique, so insert it */
   jcr->reserve_msgs->push(bstrdup(jcr->errmsg));

bail_out:
   jcr->unlock();
}
/*
 * Queue a reservation error or failure message for this jcr
 */
Queue a reservation error or failure message for this jcr
Queue a reservation error or failure message for this jcr
static void queue_reserve_message(JCR *jcr)
{
   int i;
   alist *msgs;
   char *msg;
   jcr->lock();
   msgs = jcr->reserve_msgs;
   if (!msgs) {
      goto bail_out;
   }
   for (i=msgs->size()-1; i >= 0; i--) {
      msg = (char *)msgs->get(i);
      if (!msg) {
         goto bail_out;
      }
      if (strncmp(msg, jcr->errmsg, 4) == 0) {
         goto bail_out;
      }
   }
   jcr->reserve_msgs->push(bstrdup(jcr->errmsg));
bail_out:
   jcr->unlock();
}
static void queue_reserve_message ( JCR * jcr ) { int i ; alist * msgs ; char * msg ; jcr -> lock ( ) ; msgs = jcr -> reserve_msgs ; if ( ! msgs ) { goto bail_out ; } for ( i = msgs -> size ( ) - 1 ; i >= 0 ; i -- ) { msg = ( char * ) msgs -> get ( i ) ; if ( ! msg ) { goto bail_out ; } if ( strncmp ( msg , jcr -> errmsg , 4 ) == 0 ) { goto bail_out ; } } jcr -> reserve_msgs -> push ( bstrdup ( jcr -> errmsg ) ) ; bail_out : jcr -> unlock ( ) ; }
Queue a reservation error or failure message for this jcr
Queue a reservation error or failure message for this jcr
/*
    * Look for duplicate message.  If found, do
    * not insert
    */ /* Comparison based on 4 digit message number */ /* Message unique, so insert it */