src/lib/jcr.c
static void job_end_pop(JCR *jcr)
{
   void (*job_end_cb)(JCR *jcr, void *ctx);
   void *ctx;
   for (int i=jcr->job_end_push.size()-1; i > 0; ) {
      ctx = jcr->job_end_push.get(i--);
      job_end_cb = (void (*)(JCR *,void *))jcr->job_end_push.get(i--);
      /* check for bug MA1512, MA1632 MA1639,
       * today, job_end_cb can only be reload_job_end_cb() from DIR */
      if (job_end_cb != MA1512_reload_job_end_cb && MA1512_reload_job_end_cb != NULL) {
         Tmsg2(0, "Bug 'job_end_pop' detected, skip ! job_end_cb=0x%p ctx=0x%p\n", job_end_cb, ctx);
         Tmsg0(0, "Display job_end_push list\n");
         for (int j=jcr->job_end_push.size()-1; j > 0; ) {
            void *ctx2 = jcr->job_end_push.get(j--);
            void *job_end_cb2 = jcr->job_end_push.get(j--);
            Tmsg3(0, "Bug 'job_end_pop' entry[%d] job_end_cb=0x%p ctx=0x%p\n", j+1, job_end_cb2, ctx2);
         }
      } else
      {
         job_end_cb(jcr, ctx);
      }
   }
}
/* Pop each job_end subroutine and call it */
Pop each job_end subroutine and call it
Pop each job_end subroutine and call it
static void job_end_pop(JCR *jcr)
{
   void (*job_end_cb)(JCR *jcr, void *ctx);
   void *ctx;
   for (int i=jcr->job_end_push.size()-1; i > 0; ) {
      ctx = jcr->job_end_push.get(i--);
      job_end_cb = (void (*)(JCR *,void *))jcr->job_end_push.get(i--);
      if (job_end_cb != MA1512_reload_job_end_cb && MA1512_reload_job_end_cb != NULL) {
         Tmsg2(0, "Bug 'job_end_pop' detected, skip ! job_end_cb=0x%p ctx=0x%p\n", job_end_cb, ctx);
         Tmsg0(0, "Display job_end_push list\n");
         for (int j=jcr->job_end_push.size()-1; j > 0; ) {
            void *ctx2 = jcr->job_end_push.get(j--);
            void *job_end_cb2 = jcr->job_end_push.get(j--);
            Tmsg3(0, "Bug 'job_end_pop' entry[%d] job_end_cb=0x%p ctx=0x%p\n", j+1, job_end_cb2, ctx2);
         }
      } else
      {
         job_end_cb(jcr, ctx);
      }
   }
}
static void job_end_pop ( JCR * jcr ) { void ( * job_end_cb ) ( JCR * jcr , void * ctx ) ; void * ctx ; for ( int i = jcr -> job_end_push . size ( ) - 1 ; i > 0 ; ) { ctx = jcr -> job_end_push . get ( i -- ) ; job_end_cb = ( void ( * ) ( JCR * , void * ) ) jcr -> job_end_push . get ( i -- ) ; if ( job_end_cb != MA1512_reload_job_end_cb && MA1512_reload_job_end_cb != NULL ) { Tmsg2 ( 0 , " \n " , job_end_cb , ctx ) ; Tmsg0 ( 0 , " \n " ) ; for ( int j = jcr -> job_end_push . size ( ) - 1 ; j > 0 ; ) { void * ctx2 = jcr -> job_end_push . get ( j -- ) ; void * job_end_cb2 = jcr -> job_end_push . get ( j -- ) ; Tmsg3 ( 0 , " \n " , j + 1 , job_end_cb2 , ctx2 ) ; } } else { job_end_cb ( jcr , ctx ) ; } } }
Pop each job_end subroutine and call it
Pop each job_end subroutine and call it
/* check for bug MA1512, MA1632 MA1639,
       * today, job_end_cb can only be reload_job_end_cb() from DIR */