summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/opcua/opcua.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/plugins/opcua/opcua.c b/plugins/opcua/opcua.c
index 9f1bd07f44..3a00f0ad89 100644
--- a/plugins/opcua/opcua.c
+++ b/plugins/opcua/opcua.c
@@ -332,22 +332,15 @@ static int dissect_opcua_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
/* display the service type in addition to the message type */
if (iServiceId != -1)
{
- int indx = 0;
- while (indx < g_NumServices)
+ const gchar *szServiceName = val_to_str((guint32)iServiceId, g_requesttypes, "ServiceId %d");
+
+ if (bIsLastFragment == FALSE)
{
- if (g_requesttypes[indx].value == (guint32)iServiceId)
- {
- if (bIsLastFragment == FALSE)
- {
- col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s", g_szMessageTypes[msgtype], g_requesttypes[indx].strptr);
- }
- else
- {
- col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s (Message Reassembled)", g_szMessageTypes[msgtype], g_requesttypes[indx].strptr);
- }
- break;
- }
- indx++;
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s", g_szMessageTypes[msgtype], szServiceName);
+ }
+ else
+ {
+ col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s (Message Reassembled)", g_szMessageTypes[msgtype], szServiceName);
}
}
}