]> rtime.felk.cvut.cz Git - frescor/forb.git/commitdiff
Added more debugging messages
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 5 Oct 2008 23:51:58 +0000 (01:51 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 5 Oct 2008 23:51:58 +0000 (01:51 +0200)
exec_req.c
forb.c
iop.c
request.c

index 353f6a8d570ca1716c53faa309c707fe652f389d..d3cb90f15c351152e676d384224764eccc6cb925 100644 (file)
@@ -7,7 +7,7 @@
 #include <ul_log.h>
 #include "iop.h"
 
-extern UL_LOG_CUST(ulogd_exec_req);
+extern UL_LOG_CUST(ulogd_forb_exec_req);
 
 void forb_exec_req_process(forb_exec_req_t *exec_req)
 {
diff --git a/forb.c b/forb.c
index a3215be96170cade3294458d4137dd7e00614f99..c28da99aa2ce4259edbf274c181baa0d8caf97ac 100644 (file)
--- a/forb.c
+++ b/forb.c
 #include <forb/config.h>
 #include "proto.h"
 #include <ul_logreg.h>
+#include <ul_log.h>
 #ifdef CONFIG_FORB_PROTO_UNIX
 #include <forb/proto_unix.h>
 #endif
 #include <stdio.h>
 
+#ifdef DEBUG
+#define UL_LOGL_DEF UL_LOGL_DEB
+#else
 #define UL_LOGL_DEF UL_LOGL_ERR
+#endif
 #include "log_domains.inc"
 
+extern UL_LOG_CUST(ulogd_forb);
+
+
 static void
 destroy_forb_on_exit(int exitcode, void *arg)
 {
@@ -43,6 +51,11 @@ forb_orb forb_init(void)
        
        object->instance_data = forb;
        forb_server_id_init(&forb->server_id);
+       {
+               char str[128];
+               ul_logdeb("Initializing forb %s\n",
+                         forb_server_id_to_string(str, &forb->server_id, sizeof(str)));
+       }
        if (fosa_mutex_init(&forb->request_id_mutex, 0) != 0) goto err2;
        if (fosa_mutex_init(&forb->port_mutex, 0) != 0) goto err2;
        forb_port_init_head(forb);
diff --git a/iop.c b/iop.c
index a9a987f6fa481722904fdc623c26538412c7bdb8..a9a44fb6b3c70d7e13e3c23285c34a4fadf207cf 100644 (file)
--- a/iop.c
+++ b/iop.c
@@ -20,7 +20,7 @@
 
 #define VER(major, minor) ((major)<<8 || (minor))
 
-extern UL_LOG_CUST(ulogd_iop);
+extern UL_LOG_CUST(ulogd_forb_iop);
 
 
 CORBA_boolean
@@ -361,16 +361,17 @@ process_message(forb_port_t *port, const forb_iop_message_header *mh,
                        process_request(port, codec, mh->message_size);
                        break;
                case forb_iop_REPLY:
-                 process_reply(port, codec);
+                       process_reply(port, codec);
                        break;
                case forb_iop_HELLO:
-                 process_hello(port, codec);
+                       process_hello(port, codec);
                        break;
                default:
+                       ul_logmsg("rcvd unknown message type\n");
                        break;
        }
        if (CDR_data_size(codec) != data_size - mh->message_size) {
-               ul_logerr("Message handled incorrectly\n");
+               ul_logerr("Message of type %d handled incorrectly\n", mh->message_type);
        }
 }
 
index 35bb825708b557a02b03b8b1455df5365db15944..75da2c584da71aac8217e6497265aec0ef921f24 100644 (file)
--- a/request.c
+++ b/request.c
@@ -7,7 +7,7 @@
 #include "proto.h"
 #include <ul_log.h>
 
-extern UL_LOG_CUST(ulogd_request);
+extern UL_LOG_CUST(ulogd_forb_request);
 
 static inline int forb_request_cmp(CORBA_unsigned_long *a, CORBA_unsigned_long *b)
 {