Skip to content
Snippets Groups Projects
Commit d3158984 authored by Julian Bouzas's avatar Julian Bouzas
Browse files

conf: create-endpoint.lua: make sure endpoints always have a valid name

parent 0beefe4d
No related branches found
No related tags found
No related merge requests found
......@@ -12,9 +12,9 @@ session_items = {
function addEndpoint (node, session_name, endpoint_type, priority)
local id = node["bound-id"]
local name = node.properties['node.name']
local media_class = node.properties['media.class']
local session = nil
local name = nil
-- find the session
session = sessions_om:lookup(Interest { type = "session",
......@@ -25,6 +25,12 @@ function addEndpoint (node, session_name, endpoint_type, priority)
return
end
-- get the endpoint name
name = node.properties['node.name']
if name == nil then
name = "endpoint.node." .. id
end
-- create endpoint
session_items.endpoints[id] = SessionItem ( endpoint_type )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment