From: Robert Eckhoff <54947543+apella12@users.noreply.github.com> Date: Sun, 23 Apr 2023 19:23:42 +0000 (-0400) Subject: [ipcamera] Fix servlet exceptions due to non unique names (#14872) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=4d5be1f64cb885573069ffc0b821e90f38d40970;p=openhab-addons.git [ipcamera] Fix servlet exceptions due to non unique names (#14872) * [ipcamera] Fix servlet exceptions due to non unique names [IP camera] on OH4 has the same servlet issue that was fixed by PR #14554. This PR uses that PR as a template to fix the issue in the IPcamera binding. (That issue being that only one camera was able to stream.) This was tested locally on OH4M2 and it works. Signed-off-by: Bob Eckhoff --- diff --git a/bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/servlet/IpCameraServlet.java b/bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/servlet/IpCameraServlet.java index f8f817387f..ef6f86faaa 100644 --- a/bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/servlet/IpCameraServlet.java +++ b/bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/servlet/IpCameraServlet.java @@ -59,6 +59,7 @@ public abstract class IpCameraServlet extends HttpServlet { public void startListening() { try { + initParameters.put("servlet-name", "/ipcamera/" + handler.getThing().getUID().getId()); httpService.registerServlet("/ipcamera/" + handler.getThing().getUID().getId(), this, initParameters, httpService.createDefaultHttpContext()); } catch (Exception e) {