Oaf patch ...
- From: Michael Meeks <michael ximian com>
- To: Darin Adler <darin eazel com>
- Cc: gnome-components-list gnome org
- Subject: Oaf patch ...
- Date: Tue, 17 Jul 2001 13:46:31 -0400 (EDT)
Some of this helps substantialy when trying to debug oaf, also
some misc. cleans, comments appreciated:
Regards,
Michael.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/oaf/ChangeLog,v
retrieving revision 1.165
diff -u -r1.165 ChangeLog
--- ChangeLog 2001/07/16 18:22:48 1.165
+++ ChangeLog 2001/07/17 17:28:33
@@ -1,3 +1,19 @@
+2001-07-13 Michael Meeks <michael ximian com>
+
+ * test/oaf-run-query.c (main): add a chunk of oaf_name_service_gets.
+
+2001-06-25 Michael Meeks <michael ximian com>
+
+ * oafd/od-corba.c (od_dump_list): don't dump properties
+ containing a '-' they are most likely going to screw the
+ terminal.
+
+ * liboaf/oaf-fork-server.c (oaf_server_by_forking): add
+ more debug on failure case.
+
+ * liboaf/oaf-registration.c (rloc_file_lock): remove
+ redundant re-open.
+
2001-07-09 Havoc Pennington <hp redhat com>
Merge from stable.
Index: Makefile.am
===================================================================
RCS file: /cvs/gnome/oaf/Makefile.am,v
retrieving revision 1.15
diff -u -r1.15 Makefile.am
--- Makefile.am 2001/06/19 01:46:36 1.15
+++ Makefile.am 2001/07/17 17:28:33
@@ -6,7 +6,6 @@
docs \
idl \
liboaf \
- api-docs \
oafd \
utils \
test \
Index: liboaf/oaf-activate.c
===================================================================
RCS file: /cvs/gnome/oaf/liboaf/oaf-activate.c,v
retrieving revision 1.22
diff -u -r1.22 oaf-activate.c
--- liboaf/oaf-activate.c 2001/07/16 18:22:48 1.22
+++ liboaf/oaf-activate.c 2001/07/17 17:28:33
@@ -341,7 +341,11 @@
*/
CORBA_Object oaf_name_service_get (CORBA_Environment * ev)
{
+ CORBA_Object ret;
+ ret = oaf_activate_from_id (
+ "OAFIID:oaf_naming_service:7e2b90ef-eaf0-4239-bb7c-812606fcd80d",
+ 0, NULL, ev);
+ fprintf (stderr, "Oaf name service get = '%p'", ret);
- return oaf_activate_from_id ("OAFIID:oaf_naming_service:7e2b90ef-eaf0-4239-bb7c-812606fcd80d",
- 0, NULL, ev);
+ return ret;
}
Index: liboaf/oaf-fork-server.c
===================================================================
RCS file: /cvs/gnome/oaf/liboaf/oaf-fork-server.c,v
retrieving revision 1.3
diff -u -r1.3 oaf-fork-server.c
--- liboaf/oaf-fork-server.c 2001/07/16 18:22:48 1.3
+++ liboaf/oaf-fork-server.c 2001/07/17 17:28:33
@@ -27,7 +27,7 @@
#define _GNU_SOURCE 1
#endif
#include <string.h>
-
+#include <config.h>
#include "liboaf-private.h"
#include "oaf-i18n.h"
#include <limits.h>
@@ -157,7 +157,6 @@
sigprocmask (SIG_SETMASK, &omask, NULL);
errval = OAF_GeneralError__alloc ();
errval->description = CORBA_string_dup (_("Couldn't fork a new process"));
-
CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
ex_OAF_GeneralError, errval);
return CORBA_OBJECT_NIL;
@@ -221,8 +220,10 @@
retval = CORBA_OBJECT_NIL;
#ifdef OAF_DEBUG
if (ai.do_srv_output)
- g_message ("Did string_to_object on %s",
- ai.iorbuf);
+ g_message ("Did string_to_object on %s = '%p' (%s)",
+ ai.iorbuf, retval,
+ ev->_major == CORBA_NO_EXCEPTION?
+ "no-exception" : ev->_id);
#endif
} else {
OAF_GeneralError *errval;
Index: liboaf/oaf-registration.c
===================================================================
RCS file: /cvs/gnome/oaf/liboaf/oaf-registration.c,v
retrieving revision 1.29
diff -u -r1.29 oaf-registration.c
--- liboaf/oaf-registration.c 2001/07/16 18:22:48 1.29
+++ liboaf/oaf-registration.c 2001/07/17 17:28:33
@@ -469,7 +469,6 @@
break;
}
- lock_fd = open (fn, O_CREAT | O_RDONLY, 0700);
fcntl (lock_fd, F_SETFD, FD_CLOEXEC);
if (lock_fd >= 0) {
Index: oafd/main.c
===================================================================
RCS file: /cvs/gnome/oaf/oafd/main.c,v
retrieving revision 1.30
diff -u -r1.30 main.c
--- oafd/main.c 2001/07/13 00:50:30 1.30
+++ oafd/main.c 2001/07/17 17:28:33
@@ -97,7 +97,7 @@
FILE *fh;
struct sigaction sa;
const char *oaf_debug_output;
- int dev_null_fd;
+ int dev_null_fd = -1;
if (chdir ("/")) {
g_print ("Couldn't chdir() to '/' (why ?!!). Exiting.\n");
@@ -151,6 +151,7 @@
}
orb = oaf_init (argc, argv);
+
ml = g_main_new (FALSE);
root_poa = (PortableServer_POA)
@@ -217,6 +218,7 @@
g_string_free (real_od_source_dir, TRUE);
}
+
if (server_ac) {
primary_server = ac =
OAF_ActivationContext_create (root_poa, &ev);
@@ -232,7 +234,7 @@
if (fh) {
fprintf (fh, "%s\n", ior);
fclose (fh);
- if(ior_fd <= 2)
+ if(ior_fd <= 2 && dev_null_fd > 0)
dup2 (dev_null_fd, ior_fd);
} else {
printf ("%s\n", ior);
Index: oafd/od-corba.c
===================================================================
RCS file: /cvs/gnome/oaf/oafd/od-corba.c,v
retrieving revision 1.31
diff -u -r1.31 od-corba.c
--- oafd/od-corba.c 2001/05/15 19:53:15 1.31
+++ oafd/od-corba.c 2001/07/17 17:28:33
@@ -163,10 +163,14 @@
OAF_Property *prop =
&(od->attr_servers._buffer[i].
props._buffer[j]);
+ if (strstr (prop->name, "-")) /* Translated, likely to
+ be annoying garbage value */
+ continue;
+
g_print (" %s = ", prop->name);
switch (prop->v._d) {
case OAF_P_STRING:
- g_print ("\"%s\"\n", prop->v._u.value_string);
+ g_print ("\"%s\"\n", prop->v._u.value_string);
break;
case OAF_P_NUMBER:
g_print ("%f\n", prop->v._u.value_number);
Index: test/oaf-run-query.c
===================================================================
RCS file: /cvs/gnome/oaf/test/oaf-run-query.c,v
retrieving revision 1.4
diff -u -r1.4 oaf-run-query.c
--- test/oaf-run-query.c 2000/05/27 14:47:10 1.4
+++ test/oaf-run-query.c 2001/07/17 17:28:33
@@ -11,12 +11,18 @@
CORBA_Environment ev;
char *query;
char **sort_criteria;
- int i;
+ int i, j;
- CORBA_exception_init (&ev);
oaf_init (argc, argv);
+ CORBA_exception_init (&ev);
sort_criteria = NULL;
+
+ for (j = 0; j < 5; j++) {
+ oaf_name_service_get (&ev);
+ if (ev._major == CORBA_NO_EXCEPTION)
+ g_warning ("Error getting name service '%s'", ev._id);
+ }
if (argc > 1) {
query = argv[1];
--
mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]