aboutsummaryrefslogtreecommitdiffstats
path: root/wombat/wombat.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-04-14 19:09:04 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-04-14 19:09:04 +0800
commit780baefeb6ccdbf33efd36beda2c4b50d1f569b3 (patch)
treeb4037511ee9564606bb1d5295ecef1d0120d8ec0 /wombat/wombat.c
parentb78276823ea3f4bc645a7829b0b5e32f5ecc3fec (diff)
downloadgsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.tar
gsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.tar.gz
gsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.tar.bz2
gsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.tar.lz
gsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.tar.xz
gsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.tar.zst
gsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.zip
Must pass "object" for the kind to goad_server_register(); "server" is
2000-04-14 Federico Mena Quintero <federico@helixcode.com> * wombat.c (setup_pcs): Must pass "object" for the kind to goad_server_register(); "server" is meaningless. (setup_pcs): Do not free the CORBA environment more than once. Also, fix error messages. * wombat.gnorba: The GOAD ID is "evolution:calendar-factory", not "evolution:calendar-server". * ChangeLog: Started the ChangeLog for Wombat. svn path=/trunk/; revision=2423
Diffstat (limited to 'wombat/wombat.c')
-rw-r--r--wombat/wombat.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/wombat/wombat.c b/wombat/wombat.c
index 989df9b484..24cae9713c 100644
--- a/wombat/wombat.c
+++ b/wombat/wombat.c
@@ -38,17 +38,19 @@ setup_pas (int argc, char **argv)
pas_book_factory_activate (factory);
}
-
+/* Creates the calendar factory object and registers it with GOAD */
static void
setup_pcs (int argc, char **argv)
{
+ CalFactory *factory;
int result;
CORBA_Object object;
- CalFactory *factory = cal_factory_new ();
-
+
+ factory = cal_factory_new ();
+
if (!factory) {
- g_message ("%s: %d: couldn't create a Calendar factory\n",
- __FILE__, __LINE__);
+ g_message ("setup_pcs(): Could not create the calendar factory");
+ return;
}
object = bonobo_object_corba_objref (BONOBO_OBJECT (factory));
@@ -57,26 +59,30 @@ setup_pcs (int argc, char **argv)
result = goad_server_register (CORBA_OBJECT_NIL,
object,
"evolution:calendar-factory",
- "server",
+ "object",
&ev);
- if (ev._major != CORBA_NO_EXCEPTION || result == -1) {
+ /* FIXME: should Wombat die if it gets errors here? */
- g_message ("create_cal_factory(): "
- "could not register the calendar factory");
+ if (ev._major != CORBA_NO_EXCEPTION || result == -1) {
+ g_message ("setup_pcs(): could not register the calendar factory");
bonobo_object_unref (BONOBO_OBJECT (factory));
CORBA_exception_free (&ev);
-
+ return;
} else if (result == -2) {
-
- g_message ("create_cal_factory(): "
- "a calendar factory is already registered");
+ g_message ("setup_pcs(): a calendar factory is already registered");
bonobo_object_unref (BONOBO_OBJECT (factory));
CORBA_exception_free (&ev);
-
+ return;
}
- CORBA_exception_free (&ev);
+ /* FIXME: we never connect to the destroy signal of the factory. We
+ * need to add a signal to it to indicate that the last client died.
+ * The PAS factory needs to have the same thing. When Wombat sees that
+ * both factories have lost all their clients, it should destroy the
+ * factories and terminate. */
+
+ CORBA_exception_free (&ev);
}
static void