On Fri, Apr 11, 2008 at 09:33:10AM +0200, Bastian Friedrich wrote:
> Hi,
>
> On Thursday 10 April 2008, Petar Bogdanovic wrote:
> > 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
>
> The ammount of information that is available for all kinds of
> "edit_job_codes"
> calls are differing - this is the reason for the implementation of this
> callback in the first place.
>
> Currently, there are two places where edit_job_codes is called with
> callbacks,
> in fact both inside the director (but in absolutely different parts). Feel
> free to check whether these two callbacks could be unified. The requirements
> in both places are distinct - YMMV.
Sorry, I didn't notice that we're talking about job.c and not
dird_conf.c. Recently I was playing around with job_code_callback_
_filesetname contained by the latter file and I was wondering why you
didn't choose a more general approach since this seems to be the only
working method to get some jcr-values.
Back then I wanted to add jcr->client->FDport (%p too). I assume other
people could be interested in different values.
Thanks,
Petar
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel