1999-09-29 Federico Mena Quintero <federico@redhat.com>

* gcorba.c (corba_activate_server): New function.  Activate the
	POA manager here, when we are actually ready to process requests,
	instead of at the beginning of initialization.

	* gmain.c (create_panels): Call corba_activate_server().
This commit is contained in:
Miguel de Icaza 1999-09-29 20:14:43 +00:00
parent e9118ae671
commit 7347dc591a
5 changed files with 49 additions and 11 deletions

View File

@ -1,3 +1,11 @@
1999-09-29 Federico Mena Quintero <federico@redhat.com>
* gcorba.c (corba_activate_server): New function. Activate the
POA manager here, when we are actually ready to process requests,
instead of at the beginning of initialization.
* gmain.c (create_panels): Call corba_activate_server().
1999-09-22 Federico Mena Quintero <federico@redhat.com>
* gscreen.c (panel_chdir): Clear the lists if the chdir operation

View File

@ -483,7 +483,6 @@ corba_init_server (void)
{
int retval;
CORBA_Environment ev;
PortableServer_POAManager poa_manager;
retval = FALSE;
CORBA_exception_init (&ev);
@ -494,14 +493,6 @@ corba_init_server (void)
if (ev._major != CORBA_NO_EXCEPTION)
goto out;
poa_manager = PortableServer_POA__get_the_POAManager (poa, &ev);
if (ev._major != CORBA_NO_EXCEPTION)
goto out;
PortableServer_POAManager_activate (poa_manager, &ev);
if (ev._major != CORBA_NO_EXCEPTION)
goto out;
CORBA_exception_free (&ev);
/* See if the servers are there */
@ -528,6 +519,38 @@ corba_init_server (void)
return retval;
}
/**
* corba_activate_server:
* @void:
*
* Activates the POA manager and thus makes the services available to the
* outside world.
**/
void
corba_activate_server (void)
{
CORBA_Environment ev;
PortableServer_POAManager poa_manager;
/* Do nothing if the server is already running */
if (corba_have_server)
return;
CORBA_exception_init (&ev);
poa_manager = PortableServer_POA__get_the_POAManager (poa, &ev);
if (ev._major != CORBA_NO_EXCEPTION)
goto out;
PortableServer_POAManager_activate (poa_manager, &ev);
if (ev._major != CORBA_NO_EXCEPTION)
goto out;
out:
CORBA_exception_free (&ev);
}
/**
* corba_create_window:
* @dir: The directory in which to create the window, or NULL for the cwd.

View File

@ -19,6 +19,7 @@ PortableServer_POA poa;
int corba_init_server (void);
void corba_activate_server (void);
void corba_create_window (char *dir);

View File

@ -484,8 +484,6 @@ idle_destroy_panel (gpointer data)
static void
non_corba_create_panels (char *startup_dir)
{
WPanel *panel;
desktop_init ();
gnome_init_panels ();
@ -503,6 +501,8 @@ non_corba_create_panels (char *startup_dir)
void
create_panels (void)
{
corba_activate_server ();
if (!corba_have_server)
non_corba_create_panels (this_dir ? this_dir : ".");
else {

View File

@ -2789,6 +2789,12 @@ init_corba_with_args (int *argc, char **argv, poptContext *ctx)
#endif
#ifndef HAVE_CORBA
void
corba_activate_server (void)
{
/* nothing */
}
void
corba_create_window (char *startup_dir)
{