Annoying activation silence...



Hi lads,

If we try and activate a component that fails to register the correct
iid for the factory, then we just get an indefinate hang; this seems
somewhat suboptimal to say the least. This patch at least lets you
see what is going on if you have oaf compiled with debugging support.
The problem is how to catch this in a sensible generic fashion, I would
guess that putting a low priority idle handler in that decremented a
counter a few times before at least printing a warning and severing the
pipe might work; this would give any other idle handlers a chance to
run and the app time to get under-way, of course, for those people
that need to do something extremely strange at activation time we could
disable this, [ the warning would give the poor programmer a clue, that
the reason their remote-proxy-activate-chain-bonobo thing was dying
before the other end could respond was this feature ].

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/oaf/ChangeLog,v
retrieving revision 1.39
diff -u -r1.39 ChangeLog
--- ChangeLog	2000/07/10 23:40:04	1.39
+++ ChangeLog	2000/07/14 18:51:13
@@ -1,3 +1,8 @@
+2000-07-14  Michael Meeks  <michael@helixcode.com>
+
+	* liboaf/oaf-servreg.c (oaf_active_server_register): add debug for
+	people who can't match their oafids up.
+
 2000-07-10  Robin * Slomkowski <rslomkow@eazel.com>
 
 	* test/Makefile.am: added $(scrdir) for .tmpl file
cvs server: Diffing docs
cvs server: Diffing idl
cvs server: Diffing liboaf
Index: liboaf/oaf-servreg.c
===================================================================
RCS file: /cvs/gnome/oaf/liboaf/oaf-servreg.c,v
retrieving revision 1.6
diff -u -r1.6 oaf-servreg.c
--- liboaf/oaf-servreg.c	2000/07/09 17:54:59	1.6
+++ liboaf/oaf-servreg.c	2000/07/14 18:51:13
@@ -46,6 +46,12 @@
 		else if (iorfd > 2)
 			close (iorfd);
 	}
+#ifdef OAF_DEBUG
+        else if (actid && need_printout) {
+                g_message ("Unusual '%s' was activated, but "
+                           "'%s' is needed", iid, actid);
+        }
+#endif
 
         if (actid && !strcmp(actid, iid) && oaf_private)
                 return OAF_REG_SUCCESS;


	Any comments ?

	Regards,

		Michael.


-- 
 mmeeks@gnu.org  <><, Pseudo Engineer, itinerant idiot





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