Skip to content

Error Return for filter expressions #24

@xarlord

Description

@xarlord

While working on a pcap file i had saw such error, which does not allow code to execute corrcetly, i can suggest a fix at given below, at least it worked for me.

image

    local function dump_filter(fd)
        local fh = "h264"
        if fd and fd ~= "" then
            return string.format("%s and (%s)", fh, fd)
        else
            return fh  -- Default to "h264" if no additional filter is provided
        end
    end
    
    local h264_tap = Listener.new("ip", dump_filter(get_filter()))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions