]> git.basschouten.com Git - openhab-addons.git/commitdiff
[ipcamera] Fix servlet exceptions due to non unique names (#14872)
authorRobert Eckhoff <54947543+apella12@users.noreply.github.com>
Sun, 23 Apr 2023 19:23:42 +0000 (15:23 -0400)
committerGitHub <noreply@github.com>
Sun, 23 Apr 2023 19:23:42 +0000 (21:23 +0200)
* [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 <katmandodo@yahoo.com>
bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/servlet/IpCameraServlet.java

index f8f817387f3198925e71b47c8574632df925e526..ef6f86faaa5ba106904fe4dc92a8ea23eb947f3c 100644 (file)
@@ -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) {