Fix wrong index of tag and token 01/189501/1
authorzhangzg <zg84.zhang@samsung.com>
Tue, 18 Sep 2018 07:41:45 +0000 (15:41 +0800)
committerzhangzg <zg84.zhang@samsung.com>
Tue, 18 Sep 2018 07:41:45 +0000 (15:41 +0800)
Change-Id: Ie0799a672bef5950657a3651bd142f4093091542

service/src/service.c

index 752f6740e3bf86f21c259e6795eb5413756f6e34..34ecd5cebfb41e3f5317f0c900dee8418e61d690 100755 (executable)
@@ -225,7 +225,7 @@ static int __message_send(rpc_port_stub_message_context_h context,
                 if(tag[i]!=NULL)
                 {
                     memset(tag[i], 0, BUF_LEN_128);
-                    tmp_str = nltk_get_string_from_element(nltk_get_element_from_tuple_by_index(pt_elm_tuple, 0));
+                    tmp_str = nltk_get_string_from_element(nltk_get_element_from_tuple_by_index(pt_elm_tuple, 1));
                     if(tmp_str!=NULL)
                     {
                         strncpy(tag[i], tmp_str, BUF_LEN_128-1);
@@ -239,7 +239,7 @@ static int __message_send(rpc_port_stub_message_context_h context,
                 if(token[i]!=NULL)
                 {
                     memset(token[i], 0, BUF_LEN_128);
-                    tmp_str = nltk_get_string_from_element(nltk_get_element_from_tuple_by_index(pt_elm_tuple, 1));
+                    tmp_str = nltk_get_string_from_element(nltk_get_element_from_tuple_by_index(pt_elm_tuple, 0));
                     if(tmp_str!=NULL)
                     {
                         strncpy(token[i], tmp_str, BUF_LEN_128-1);
@@ -280,7 +280,7 @@ static int __message_send(rpc_port_stub_message_context_h context,
                 if(s_tag[i]!=NULL)
                 {
                     memset(s_tag[i], 0, BUF_LEN_128);
-                    tmp_str = nltk_get_string_from_element(nltk_get_element_from_tuple_by_index(ne_elm_tuple, 0));
+                    tmp_str = nltk_get_string_from_element(nltk_get_element_from_tuple_by_index(ne_elm_tuple, 1));
                     if(tmp_str!=NULL)
                     {
                         strncpy(s_tag[i], tmp_str, BUF_LEN_128-1);
@@ -294,7 +294,7 @@ static int __message_send(rpc_port_stub_message_context_h context,
                 if(s_token[i]!=NULL)
                 {
                     memset(s_token[i], 0, BUF_LEN_128);
-                    tmp_str = nltk_get_string_from_element(nltk_get_element_from_tuple_by_index(ne_elm_tuple, 1));
+                    tmp_str = nltk_get_string_from_element(nltk_get_element_from_tuple_by_index(ne_elm_tuple, 0));
                     if(tmp_str!=NULL)
                     {
                         strncpy(s_token[i], tmp_str, BUF_LEN_128-1);