mqtt: Check for a valid payload protocol
Make the "Payload protocol" mandatory when configuring message decoding. Change-Id: Ia3cd8cb1b789b80439f55bdd87e7f1bd806013e0 Ping-Bug: 15738 Reviewed-on: https://code.wireshark.org/review/33021 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
4addfb6b16
commit
d8d1d6409e
|
@ -617,6 +617,12 @@ static gboolean mqtt_message_decode_update_cb(void *record, char **error)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (u->payload_proto_name == NULL || strlen(u->payload_proto_name) == 0)
|
||||||
|
{
|
||||||
|
*error = g_strdup("Missing payload protocol");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (u->match_criteria == MATCH_CRITERIA_REGEX)
|
if (u->match_criteria == MATCH_CRITERIA_REGEX)
|
||||||
{
|
{
|
||||||
u->topic_regex = g_regex_new(u->topic_pattern, (GRegexCompileFlags) G_REGEX_OPTIMIZE, (GRegexMatchFlags) 0, NULL);
|
u->topic_regex = g_regex_new(u->topic_pattern, (GRegexCompileFlags) G_REGEX_OPTIMIZE, (GRegexMatchFlags) 0, NULL);
|
||||||
|
|
Loading…
Reference in New Issue