Commit Graph
124 Commits
Author SHA1 Message Date
nicandClaude Opus 5.5 07179d7eae fix: set the WS-Discovery probe's interface before sending (#5257)
WSDiscovery::TransportUDP::send_multi opened its socket with PeerAddr,
which connects it, and called mcast_if afterwards. A connected UDP
socket keeps the route chosen at connect time, so on a host with more
than one network the Probe left through the default route whatever
interface was chosen: the web UI's ONVIF probe (zmonvif-probe.pl probe
<version> <interface>) found no camera on a second network.

Open the socket unconnected, set mcast_if first, and send to the group
with mcast_send. The destination is passed as a packed sockaddr_in:
given as "addr:port", mcast_send in IO::Socket::Multicast 1.12 (Debian
trixie) ends up with port 0 and the send fails with EINVAL. Without an
interface nothing changes: the probe goes out the default route as
before.

tests/perl/test_wsdiscovery_mcast_if.pl records the socket calls and
checks the order and the destination.

fixes #5256

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 14:26:40 -04:00
Nic BoetandClaude Opus 4.6 c23869b6ac build: replace Perl ExtUtils::MakeMaker with pure CMake install
MakeMaker was only used to copy .pm files — no XS compilation, no binary
linking, no dependency resolution. Its hardcoded "Makefile" output name
conflicts with cmake's generated Makefile for in-source builds, and using
FIRST_MAKEFILE=MakefilePerl causes thousands of "uninitialized value"
warnings because MM.pm stats the wrong file.

Replace with native CMake install(DIRECTORY ... FILES_MATCHING PATTERN
"*.pm") directives. Perl module install path is auto-detected at configure
time via `perl -MConfig` (vendorlib on Linux, sitelib on FreeBSD),
overridable with -DZM_PERL_INSTALL_PATH=<path>.

What's removed:
- ExtUtils::MakeMaker as build dependency
- Three perl+make subprocesses at build time (zmperlmodules,
  zmonvifmodules, zmonvifproxy build targets)
- ~6000 auto-generated man3 pages from WSDL stubs
- MakeMaker scaffolding: Makefile.PL, MANIFEST, META.yml, Changes,
  README, and t/ZoneMinder.t test stub

What's preserved:
- configure_file() for .pm.in templates (same behavior)
- ZM_PERL_SEARCH_PATH (independent mechanism, unchanged)
- Section 8 man pages for .pl scripts (Pod2Man.cmake, unaffected)
- DESTDIR support (CMake install() handles natively)
- Installed file paths (perl -MConfig returns same paths MakeMaker used)

Verified: 3102 .pm files installed, 0 .pm.in files, 0 .3pm man pages,
no @VERSION@ markers in generated files, DESTDIR and user override work.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 14:47:35 -06:00
Isaac ConnorandClaude Opus 4.6 c250eadcea fix: use ${PERL_EXECUTABLE} instead of hardcoded perl in CMake builds
Replace 4 hardcoded `perl` invocations with `${PERL_EXECUTABLE}` from
find_package(Perl) so builds work when perl isn't in PATH or the wrong
perl would be found (NixOS, custom installs, Homebrew vs system).

Also: fix ZMCONFGEN_RESULT variable case mismatch in error message,
remove deprecated IMMEDIATE keyword from configure_file(), bump
cmake_minimum_required from 3.5 to 3.12 (C++17 requires 3.9+), and
remove dead C++11 fallback for CMake < 3.8 in ConfigureBaseTargets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 12:25:37 -05:00
Alejandro Criado-Pérez 8e17d9075b Onvif corrections 2023-08-13 18:57:36 +02:00
root e6be9210c5 fixes bug with zmonvif-trigger.pl (Perl) :
zmonvif-trigger.pl is a Perl script that is supposed to monitor and forward
onvif events to ZM . Currently this does not wok as :
SOAP requests need to have a header containing "Action"	"To" and "UIID" fields
as per ONVIF specifications  (tested with Reolink rlc-831A)
This patch fixes that (creates proper SOAP headers ) .
IT now works ( tested with Reolink rlc-831A)
2023-07-02 10:32:28 +02:00
Isaac Connor 16ccac2325 Code style, add some parenthesis to make logic more clear 2023-03-21 10:03:57 -04:00
Håvard Flaget Aasen f2281d1017 Typos in documentation
This is typos noticed by lintian.
2021-10-17 13:29:00 +02:00
Håvard Flaget Aasen 5970416f0b Fix errors when converting man-pages with pod2man.
Change unrecognised characters to corresponding ASCII value.

pod2man generates errors when encountering non-ASCII characters.
It correctly guesses UTF-8, but it still displays an error message
in the produced man-page.
2021-10-17 13:23:41 +02:00
Peter Keresztes Schmidt 6c9983155c Build: Reindent the CMakeLists
Indent with 2 spaces
Also remove expressions form closing tags. They have been made optional a while ago since they make reading rather more difficult.
2021-02-04 22:00:56 +01:00
Peter Keresztes Schmidt 4db0dea1f2 Build: Make building man pages optional (enabled by default)
Add a new CMake option (-DBUILD_MAN) which can be used
to deactivate the man page build steps.
This is especially useful in a development situation where "make all"
is needlessly slowed down by these build steps.
2021-02-03 21:22:28 +01:00
Isaac Connor 0d71b18097 Merge branch 'release-1.34' 2020-11-20 16:39:40 -05:00
Isaac Connor 1b5448ede4 Handle there being no services in the response 2020-11-20 16:35:48 -05:00
Isaac Connor dbb2535a6b Merge branch 'master' of github.com:zoneminder/ZoneMinder 2020-08-14 13:08:04 -04:00
Isaac Connor 2f57ccc9b9 Merge branch 'release-1.34' 2020-07-29 16:27:01 -04:00
Isaac Connor 7aa46df50f Merge branch 'master' of github.com:/ZoneMinder/zoneminder 2020-07-23 12:05:32 -04:00
Isaac Connor 08afb50efa debug, spacing, quotes 2020-06-25 16:04:50 -04:00
Isaac Connor 1e6aaf9814 remove generated files 2020-05-13 07:29:14 -04:00
Isaac Connor 9aa297f7cd spacing 2020-05-12 15:48:14 -04:00
Isaac Connor 8f3a8ee877 spacing 2020-05-12 15:47:44 -04:00
Isaac Connor f8249251bd Add a verbose var to ONVIF::CLient and allow it to be set during build. 2020-05-12 15:47:27 -04:00
Isaac Connor 5676e825c6 remove autogenerated files 2020-05-12 11:13:17 -04:00
Isaac Connor aca642d3db remove autogenerated files 2020-05-12 11:13:09 -04:00
Isaac Connor 9beb1973df move the db update script to a modern version so it gets executed
move zmonvif-trigger.pl to /scripts
2020-05-09 18:04:27 -04:00
Isaac Connor 8ed80f320d Remove SOAP::List stuff 2020-05-09 17:35:03 -04:00
Isaac Connor 98a112d3c0 code style 2020-05-09 17:21:57 -04:00
Isaac Connor 1026a22e97 delete old Makefiles 2020-05-09 16:46:55 -04:00
Isaac Connor 81fe14c80f remove cruft 2020-05-09 16:45:04 -04:00
Isaac Connor 75082064fd Merge branch 'master' of github.com:zoneminder/ZoneMinder into onvif_updated_to_upstream 2020-05-09 16:40:17 -04:00
Isaac Connor 732bb5416f Merge branch 'master' into onvif_updated 2020-05-09 16:26:29 -04:00
Isaac Connor 2315bed56d Add set_net_interface function and use the when setting up the multicast socket 2020-02-19 14:27:36 -05:00
Isaac Connor 466468b0fd code style cleanups and uncomment get_service_urls call in create_services so that we actually parse the ONVIF response. 2020-02-09 13:50:22 -05:00
Isaac Connor 5f702c1905 WHen instantiating the client, can't get services because we havn't set credentials yet 2019-10-03 17:36:57 -04:00
Isaac Connor c62eff48a7 Turn off debugging that prevents results processing 2019-10-03 17:28:44 -04:00
Isaac Connor 45a9f9158d spelling mistakes 2018-11-29 10:45:30 -05:00
Isaac Connor e7fb0f649b move zmonvif-probe.pl to ../scripts. This is in preparation for removing the onvif library from the Zoneminder source into it's own package. 2018-01-31 16:56:14 -05:00
Isaac Connor b3984ea2da Merge branch 'master' into storageareas 2017-07-14 10:38:20 -04:00
Isaac Connor 9d1d2c1ce4 print the line out all at once, fixing the missing comma after fps. 2017-07-13 10:27:53 -04:00
Isaac Connor 171891cd52 Merge branch 'fix_zmonvif' into storageareas 2017-07-13 09:41:59 -04:00
Isaac Connor 5d96a8d14e make code more robust by handling an undefined get_VideoEncoderConfiguration() 2017-07-13 09:38:42 -04:00
Isaac Connor 5ae34a7561 Merge branch 'master' into storageareas 2017-01-02 09:39:10 -05:00
Andy Bauer 0f15b3ae62 update gpl 2 mailing address 2016-12-26 10:33:03 -06:00
Isaac Connor 96b5af9021 Merge branch 'fix_onvif' into storageareas 2016-10-04 15:00:28 -04:00
Isaac Connor 7561dc00ea be explici about which unnamed array we are access for getopts. Default username and password to '' 2016-10-04 14:33:13 -04:00
Isaac Connor e7eab488c9 password is not required, set it to '' to quiet warnings 2016-10-04 14:28:30 -04:00
Isaac Connor 84a18926d8 password is not required, set it to '' to quiet warnings 2016-10-04 14:28:03 -04:00
Isaac Connor df255d3d5d check for existence of attribute before calling it to break gently 2016-10-04 14:07:11 -04:00
Isaac Connor 866b6fea8c Fall back to getCapabilities if getServices is not supported. 2016-10-04 14:06:23 -04:00
Isaac Connor c1f9c0aff5 also need ProbeMatchesType to inherit get_ProbeMatch 2016-10-04 10:16:01 -04:00
Isaac Connor b742d316b3 apply use strict and fix issues 2016-10-04 10:15:16 -04:00
Isaac Connor e6626cef69 if soap version is specified for probe, don't do both versions 2016-10-04 09:51:20 -04:00