[Fwd: [Gnucash-changes] r13084 - gnucash/trunk - Fix overall and ".log"-specific file-retention issues: Bug#329670 (++).]

Josh Sled jsled at asynchronous.org
Thu Feb 2 21:32:41 EST 2006


Hey Neil...

-------- Forwarded Message --------
> Author: jsled
> Date: 2006-02-02 21:09:29 -0500 (Thu, 02 Feb 2006)
> New Revision: 13084
> Trac: http://svn.gnucash.org/trac/changeset/13084
> 
> Modified:
>    gnucash/trunk/ChangeLog
>    gnucash/trunk/lib/libqof/qof/qofsession.c
>    gnucash/trunk/src/backend/file/gnc-backend-file.c
> Log:
> Fix overall and ".log"-specific file-retention issues: Bug#329670 (++).

> Modified: gnucash/trunk/lib/libqof/qof/qofsession.c
> ===================================================================
> --- gnucash/trunk/lib/libqof/qof/qofsession.c	2006-02-03 00:47:40 UTC (rev 13083)
> +++ gnucash/trunk/lib/libqof/qof/qofsession.c	2006-02-03 02:09:29 UTC (rev 13084)
> @@ -888,7 +888,13 @@
>  				continue;
>  			}
>  			/* Use the providers creation callback */
> -      	    session->backend = (*(prov->backend_new))();
> +                        session->backend = (*(prov->backend_new))();
> +                        /* Initialize be configuration. */
> +                        {
> +                                KvpFrame *config;
> +                                config = qof_backend_get_config(session->backend);
> +                                qof_backend_load_config(session->backend, config);
> +                        }
>  			session->backend->provider = prov;
>  			/* Tell the books about the backend that they'll be using. */
>  			for (node=session->books; node; node=node->next)

I know you'd rather be notified before commits to qof, but I figured
it'd be easier to see the change in context; I'm in no way married to
this particular change, but this does seem to work ... I'm curious as to
your take on what the right solution is...

Trying to debug Bug#329670, I noticed that the .xac and .log
file-cleanup code wasn't being invoked appropriately since the
file_retention_days wasn't being set.  In fact, the gnc-file-backend's
get- and load-config code was never actually being invoked by either QOF
or GnuCash...

It seems logical that QOF should configure a backend's options after
loading it, and as such the change I made here seems right.  Is there a
better alternative?

-- 
...jsled
http://asynchronous.org/ - `a=jsled; b=asynchronous.org; echo ${a}@${b}`


More information about the gnucash-devel mailing list