stupid IDL design



Hi,

I've discovered that my client-to-daemon interface is fundamentally
broken:

  typedef unsigned long Context;

  Context get_context(in string address);
  
  unsigned long add_listener(in Context ctx, in string where, in ConfigListener who);  

The problem is that once you start to deal with gconfd exiting or
crashing, the Context numbers can get recycled, and things get
uncontrollably complicated very quickly because you can't detect
inconsistencies and screwups due to this recycling. I've always had
this problem in the back of my head, but never fully thought it
through and realized that there are several good ways to fix this, and
I didn't use them because I am apparently a moron. :-(

So, I'm going to replace "typedef unsigned long Context" with either a
full-blown object instance, or with a context ID plus a unique
identifier for the daemon (such as the timestamp when the daemon was
started combined with its pid, maybe). This simplifies a bunch of code
in gconfd.c and gconf.c, hopefully. But the patch is probably large.

Havoc






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