Change NameServer_get to ignore 'remote get' timeouts and use a reduced period.
authorvwan@ti.com <vwan@ti.com>
Wed, 28 Aug 2013 18:30:44 +0000 (11:30 -0700)
committerChris Ring <cring@ti.com>
Wed, 28 Aug 2013 23:46:52 +0000 (16:46 -0700)
This is to fix SDOCM00102548 for QNX, so that MessageQ_open succeeds when
the IPU is loaded with an executable that does not 'speak' NameServer.

Signed-off-by: VW <vwan@ti.com>
hlos_common/include/_NameServerRemoteRpmsg.h
linux/src/daemon/NameServer_daemon.c
qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/NameServer_daemon.c

index cb1d2ec6a7cd0cae7ae404a63fc2d812b376b914..70238f9e8af4996640b29cfb903147518928f488 100644 (file)
@@ -39,7 +39,7 @@
 #define NAMEARRAYSZIE   (((MAXNAMEINCHAR - 1) / sizeof(Bits32)) + 1)
 #define MAXVALUELEN   75
 
-#define NAMESERVER_GET_TIMEOUT  10 /* Seconds */
+#define NAMESERVER_GET_TIMEOUT  20000 /* microseconds */
 
 #define NAMESERVER_MSG_TOKEN   0x5678abcd
 
index b8aec85925c25a7f3082bac48719d1f181c0228f..067bcd809a0630f3c2c2b432ead99a3b4f58e120 100644 (file)
@@ -932,8 +932,8 @@ Int NameServer_getRemote(NameServer_Handle handle,
     int err;
 
     /* Set Timeout to wait: */
-    tv.tv_sec = NAMESERVER_GET_TIMEOUT;
-    tv.tv_usec = 0;
+    tv.tv_sec = 0;
+    tv.tv_usec = NAMESERVER_GET_TIMEOUT;
 
     /* Create request message and send to remote: */
     sock = NameServer_module->sendSock[procId];
index f166516332329f074c8b00d6b4f5355779ab9111..210316778a9fc38ab46973c6e14bd15be557b146 100644 (file)
@@ -794,8 +794,8 @@ Int NameServer_getRemote(NameServer_Handle handle,
     pthread_mutex_lock(&NameServer_module->modGate);
 
     /* Set Timeout to wait: */
-    tv.tv_sec = NAMESERVER_GET_TIMEOUT;
-    tv.tv_usec = 0;
+    tv.tv_sec = 0;
+    tv.tv_usec = NAMESERVER_GET_TIMEOUT;
 
     /* Create request message and send to remote processor: */
     nsMsg.reserved = NAMESERVER_MSG_TOKEN;
@@ -909,7 +909,8 @@ Int NameServer_get(NameServer_Handle handle,
                 status = NameServer_getRemote(handle, name, value, len, i);
 
                 if ((status >= 0) ||
-                    ((status < 0) && (status != NameServer_E_NOTFOUND))) {
+                    ((status < 0) && (status != NameServer_E_NOTFOUND) &&
+                    (status != NameServer_E_TIMEOUT))) {
                     break;
                 }
             }