[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] Clone jobs and pool


On Thu, Apr 10, 2008 at 10:43:53AM +0200, Bastian Friedrich wrote:
> 
> By using the attached patch, one can use a "pool=%p" in the run statement to 
> do this. The patch uses the callback code that I have submitted a while ago 
> (in the thread "Accessing fileset in lib/util.c?"); this code has been in the 
> public svn for a while now.
>
> (...)
>
> Index: bacula-2.2-20080404svn/src/dird/job.c
> ===================================================================
> --- bacula-2.2-20080404svn/src/dird/job.c	(revision 6786)
> +++ bacula-2.2-20080404svn/src/dird/job.c	(working copy)
> @@ -1272,6 +1272,14 @@
>     jcr->wstore = NULL;
>  }
>  
> +char *job_code_callback_clones(JCR *jcr, const char* param) {
> +	if (param[0] == 'p') {
> +		return jcr->pool->name();
> +	} else {
> +		return NULL;
> +	}
> +}
> +

Why not creating just one callback function with a more general name and
doing a switch() on param[0] afterwards?

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilotco.