fix: distingush initial vector from request vector when print evlog
authorHeebum Kwak <heebum0.kwak@samsung.com>
Mon, 20 May 2013 05:59:40 +0000 (14:59 +0900)
committerBoram Park <boram1288.park@samsung.com>
Mon, 17 Jun 2013 08:44:34 +0000 (17:44 +0900)
Change-Id: I297a80b794a114f63f30fca59961d071152601ce

common/ds/bool_exp_rule_checker.c
common/xdbg_evlog_request.c
module/xdbg_module_evlog.c

index c5325cd..ae4de01 100644 (file)
@@ -344,7 +344,7 @@ const char * rulechecker_print_usage()
         "######################################################################\n"
         "###     RuleChecker 1.0 for XDBG EvLog filtering.                  ###\n"
         "###                 Designed and developed by                      ###\n"
-        "###                 Boram Park <boram1288.park@samsung.com>        ###\n"
+        "###                 YoungHoon Jung <yhoon.jung@samsung.com>        ###\n"
         "######################################################################\n"
         "\n"
         "-----------------------------------------------------------------\n"
index 5bcd38d..97ecc24 100644 (file)
@@ -59,6 +59,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define UNKNOWN_EVENT "<unknown>"
 
+char *conn[] = {"Initial Connect", "Establich Connect"};
 
 char *
 xDbgEvlogReqeust (EvlogInfo *evinfo, Bool on, char *reply, int *len)
@@ -67,7 +68,7 @@ xDbgEvlogReqeust (EvlogInfo *evinfo, Bool on, char *reply, int *len)
     extern int Extensions_size;
     EvlogRequest req;
     xReq *xReq = NULL;
-
+    int i;
 
     RETURN_VAL_IF_FAIL (evinfo != NULL, reply);
     RETURN_VAL_IF_FAIL (evinfo->type == REQUEST, reply);
@@ -80,14 +81,16 @@ xDbgEvlogReqeust (EvlogInfo *evinfo, Bool on, char *reply, int *len)
     if(!on)
         return reply;
 
+    for (i = 0 ; i < sizeof(conn) / sizeof(char *) ; i++)
+        if (!strcmp(evinfo->req.name, conn[i]))
+            return reply;
+
     if (xReq->reqType < EXTENSION_BASE)
     {
         return xDbgEvlogRequestCore (evinfo, reply, len);
     }
     else
     {
-        int i;
-
         for (i = 0 ; i < Extensions_size ; i++)
         {
             if (xReq->reqType == Evlog_extensions[i].opcode)
index 6f2191b..42141ce 100644 (file)
@@ -268,6 +268,8 @@ static void evtPrint (EvlogType type, ClientPtr client, xEvent *ev)
         /* evinfo.req */
         if (type == REQUEST)
         {
+            extern char *conn[];
+
             REQUEST (xReq);
 
             evinfo.mask |= EVLOG_MASK_REQUEST;
@@ -275,12 +277,19 @@ static void evtPrint (EvlogType type, ClientPtr client, xEvent *ev)
             evinfo.req.length = client->req_len;
             evinfo.req.ptr = client->requestBuffer;
 
-            if (stuff->reqType < EXTENSION_BASE)
-                snprintf (evinfo.req.name, sizeof (evinfo.req.name), "%s",
-                          LookupRequestName (stuff->reqType, 0));
+            if (client->requestVector == InitialVector && stuff->reqType == 1)
+                snprintf (evinfo.req.name, sizeof (evinfo.req.name), "%s", conn[0]);
+            else if (client->requestVector == InitialVector  && stuff->reqType == 2)
+                snprintf (evinfo.req.name, sizeof (evinfo.req.name), "%s", conn[1]);
             else
-                snprintf (evinfo.req.name, sizeof (evinfo.req.name), "%s",
-                          LookupRequestName (stuff->reqType, stuff->data));
+            {
+                if (stuff->reqType < EXTENSION_BASE)
+                    snprintf (evinfo.req.name, sizeof (evinfo.req.name), "%s",
+                              LookupRequestName (stuff->reqType, 0));
+                else
+                    snprintf (evinfo.req.name, sizeof (evinfo.req.name), "%s",
+                              LookupRequestName (stuff->reqType, stuff->data));
+            }
         }
     }