[Gpe-list] Fwd: libeventdb readonly support

Graham Cobb g+gpe at cobb.uk.net
Tue Jun 24 18:21:02 CEST 2008


[oops.  I just managed to resend yesterday's email!  Try again...]

This is now ready for testing, from my daily build directories (for chinook 
only for now -- bora and gregale will appear in the next day or two and I am 
not building for diablo yet).

I believe this should fix the problem some people have seen with duplicate 
alarms appearing.  Please let me know, or report in the bugzilla, if that 
problem still occurs (or any other, of course).

Graham

----------  Forwarded Message  ----------

Subject: [lists] [Gpe-list] libeventdb readonly support
Date: Monday 23 June 2008
From: Graham Cobb <g+gpe at cobb.uk.net>
To: gpe-list at linuxtogo.org

I have just checked in some changes to libeventdb to add the concept 
of "readonly" access to the event database.

This is necessary to fix a problem with the new gpesummary code: if two 
applications both open the event DB they interfere with each other due to the 
caching that libeventdb does.  In particular, even if one of them makes no 
changes to the database, libeventdb updates the unacknowledged alarms list 
from both processes and things go wrong (e.g. if the alarm is acknowledged in 
gpe-calendar, gpesummary can overwrite the status causing it to appear 
unacknowledged again).

The change is the addition of a new function: event_db_readonly.  This works 
in exactly the same way as event_db_new (it takes the same arguments and 
returns the same results) except that it marks the database as read only.  It 
will not create the database or convert it: if it doesn't already exist at 
the current version level it returns an error.  Note: I have also increased 
the version number of the library.  

libeventdb will not make any automatic (behind the scenes) changes to a 
readonly database (such as marking events as unacknowledged).  Any attempt by 
the calling application to make changes to a read only database (e.g. by 
setting event attributes or creating or deleting events) will result in an 
assertion failure in the libeventdb code.

How do I arrange to update the documentation to add the new function?  Is the 
only API documentation still the stuff in 
http://www.kernelconcepts.de/~fuchs/gpe/doc/?

Graham

_______________________________________________
Gpe-list mailing list
Gpe-list at linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/gpe-list

-------------------------------------------------------



More information about the Gpe-list mailing list