You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2780 lines
85 KiB

​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
2 years ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
2 years ago
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 years ago
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
la_mojo pOnvif: ONVIF compliance fixes (report points 1-6) 1. Faults are no longer reported as success: every request waits for the answer, checks the HTTP status and the SOAP Fault (logged with Code/Subcode/Reason); getLastError()/getLastFault() tell the caller. protocolPTZ_ONVIF clears m_bStatus (-> reconnect) only on communication errors, not on a Fault from a reachable camera. AbsoluteMove now waits for its answer too. 2. Request/reply race: already fixed in #11 (checked). 3. NULL-safe parsing of optional elements (safeCopy/safeAtoi/safeAtof), videoSource zero-filled, Imaging values parsed as float, IrCutFilter AUTO no longer read as OFF, missing XAddr no longer becomes "(null)", GetSystemDateAndTime without UTCDateTime no longer breaks the token time (falls back to the local clock). 4. GetProfiles parses PTZConfiguration; the PTZ profile is the first one that has it (fallback to profile 0 with an error log); create() fails cleanly when the device has no profiles instead of throwing. 5. Pan/tilt and zoom in one ContinuousMove with Timeout PT10S (PONVIF_CONTINUOUS_MOVE_TIMEOUT_S); Stop honours its pantilt/zoom flags. 6. WS-Security: 16-byte RAND_bytes nonce, no fixed-size digest buffer, header only when a user name is set (anonymous devices), user name and all string arguments XML-escaped. Requests are built by _buildRequest() from body templates. HTTP auth mode 0 now uses CURLAUTH_ANY (sends no password until the device asks; Digest preferred) instead of Basic; no HTTP auth without credentials. Also: Content-Type without the trailing ';', GetServices/ GetDeviceInformation sent to the device service, printf format-string bugs on device replies fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
22 hours ago
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #include "ponvif.h"
  2. #include <fcntl.h>
  3. #include <openssl/rand.h>
  4. #include <stdarg.h>
  5. #include <stdio.h>
  6. #include <string>
  7. #include <stdlib.h>
  8. #include <string.h>
  9. #include <sys/types.h> /* See NOTES */
  10. #include <sys/types.h>
  11. // http://dspace.nplg.gov.ge/handle/1234/3051
  12. // http://dspace.nplg.gov.ge/handle/1234/3057
  13. // http://dspace.nplg.gov.ge/handle/1234/3061
  14. #define LOG(X) m_pLog->Log("PONVIF", this, X)
  15. #define TLOG(X) basicLogCollection::getInstance()->Log("PONVIF_T", NULL, X)
  16. #ifdef DEBUG
  17. #define LOG_ERROR(X) \
  18. { \
  19. char _tBfrErrMSG2w34[512]; \
  20. sprintf(_tBfrErrMSG2w34, "In file %s[%d] in func:%s %s", __FILE__, __LINE__, __func__, X); \
  21. m_pLog->Log("PONVIF", this, _LOG_ERROR, _tBfrErrMSG2w34); \
  22. }
  23. #else
  24. #define LOG_ERROR(X) m_pLog->Log("PONVIF", this, _LOG_ERROR, X);
  25. #endif
  26. inline bool checkBool(const char * A)
  27. {
  28. if (A == NULL)
  29. {
  30. return false;
  31. }
  32. return (A[0] == 'T' || A[0] == 't' || A[0] == '1');
  33. }
  34. // IrCutFilter / BacklightCompensation etc.: "ON" / "OFF" (also accepts 1 / 0)
  35. inline bool checkOnOff(const char * A)
  36. {
  37. if (A == NULL)
  38. {
  39. return false;
  40. }
  41. return (strcasecmp(A, "ON") == 0 || strcmp(A, "1") == 0);
  42. }
  43. // tt:IrCutFilterMode: ON / OFF / AUTO
  44. inline onvifOnOffAuto checkOnOffAuto(const char * A)
  45. {
  46. if (A == NULL)
  47. {
  48. return AUTO;
  49. }
  50. if (strcasecmp(A, "ON") == 0 || strcmp(A, "1") == 0)
  51. {
  52. return ON;
  53. }
  54. if (strcasecmp(A, "OFF") == 0 || strcmp(A, "0") == 0)
  55. {
  56. return OFF;
  57. }
  58. return AUTO;
  59. }
  60. /*
  61. NULL-safe readers: most ONVIF elements/attributes are optional, XMLNode::getText()/getAttribute()
  62. return NULL when they are missing.
  63. */
  64. inline void safeCopy(char * dst, size_t dstSize, const char * src)
  65. {
  66. if (dst == NULL || dstSize == 0)
  67. {
  68. return;
  69. }
  70. snprintf(dst, dstSize, "%s", (src != NULL) ? src : "");
  71. }
  72. inline int safeAtoi(const char * A, int def = 0)
  73. {
  74. return (A != NULL) ? atoi(A) : def;
  75. }
  76. inline float safeAtof(const char * A, float def = 0.0f)
  77. {
  78. return (A != NULL) ? (float) atof(A) : def;
  79. }
  80. // XML-escaped copy as std::string, for printf arguments (the temporary lives until the end of the full expression)
  81. static std::string xesc(const char * src)
  82. {
  83. if (src == NULL)
  84. {
  85. return std::string();
  86. }
  87. size_t len = strlen(src) * 6 + 1;
  88. char * tB = (char *) malloc(len);
  89. if (tB == NULL)
  90. {
  91. return std::string();
  92. }
  93. pOnvif::_xmlEscape(src, tB, len);
  94. std::string rVal(tB);
  95. free(tB);
  96. return rVal;
  97. }
  98. pOnvif::pOnvif()
  99. {
  100. m_pLog = basicLogCollection::getInstance();
  101. m_pIpAddress = NULL;
  102. m_pUsername = NULL;
  103. m_pPassword = NULL;
  104. m_pMediaURI = NULL;
  105. m_pSnapshotURI = NULL;
  106. m_pDeviceURI = NULL;
  107. m_pPTZURI = NULL;
  108. m_pBaseURI = NULL;
  109. m_nDeltaTime = 0;
  110. m_pCURL = NULL;
  111. m_pProxyHost = NULL;
  112. m_nProxyPort = 0;
  113. m_pProxyUsername = NULL;
  114. m_pProxyPassword = NULL;
  115. m_pLastResponse = NULL;
  116. m_bIntransingent = true;
  117. m_nDiscoveryTimeout = PONVIF_DEFAULT_DISCOVERYTIMEOUT;
  118. m_pDiscoveryBindIP = NULL; // PONVIF_DEFAULT_DISCOVERYBINDIP;
  119. m_pDiscoveryMCastIP = NULL; // PONVIF_DEFAULT_DISCOVERYMCASTIP;
  120. m_nDiscoveryMCastPort = PONVIF_DEFAULT_DISCOVERYMCASTPORT;
  121. m_bDiscoveryHideDuplicates = true;
  122. m_pHttpAccessManager = NULL;
  123. memset( &m_sCapabilities, 0, sizeof( nodeCapability ) );
  124. m_bAuthMode = 0;
  125. parser_done = false;
  126. m_pPendingRequest = NULL;
  127. m_nLastHttpCode = 0;
  128. m_eLastError = PONVIF_OK;
  129. m_cLastFault[0] = (char) 0;
  130. m_sOnvifVersion.Major = 0;
  131. m_sOnvifVersion.Minor = 0;
  132. LOG("Constructor Done!");
  133. }
  134. void pOnvif::cleanNodeCapability( nodeCapability *ptr ){
  135. LOG("A");
  136. if ( ptr->Analytics ) free( ptr->Analytics );
  137. LOG("B");
  138. if ( ptr->Device ){
  139. LOG("1");
  140. if ( ptr->Device->Network ){
  141. LOG("1a");
  142. if ( ptr->Device->Network->Extension) {
  143. if ( ptr->Device->Network->Extension->Extension ) free ( ptr->Device->Network->Extension->Extension );
  144. free( ptr->Device->Network->Extension );
  145. };
  146. free( ptr->Device->Network );
  147. };
  148. LOG("2");
  149. if ( ptr->Device->System ){
  150. LOG("2a");
  151. if( ptr->Device->System->SupportedVersions ) free( ptr->Device->System->SupportedVersions );
  152. if ( ptr->Device->System->Extension) {
  153. if ( ptr->Device->System->Extension->Extension ) free ( ptr->Device->System->Extension->Extension );
  154. free( ptr->Device->System->Extension );
  155. };
  156. free( ptr->Device->System );
  157. };
  158. LOG("3");
  159. if ( ptr->Device->IO ){
  160. LOG("3a");
  161. if ( ptr->Device->IO->Extension) {
  162. if( ptr->Device->IO->Extension->AuxiliaryCommands ) free( ptr->Device->IO->Extension->AuxiliaryCommands );
  163. if ( ptr->Device->IO->Extension->Extension ) free ( ptr->Device->IO->Extension->Extension );
  164. free( ptr->Device->IO->Extension );
  165. };
  166. free( ptr->Device->IO );
  167. };
  168. LOG("4");
  169. if ( ptr->Device->Security ){
  170. LOG("4a");
  171. if ( ptr->Device->Security->Extension) {
  172. if ( ptr->Device->Security->Extension->Extension ) free ( ptr->Device->Security->Extension->Extension );
  173. free( ptr->Device->Security->Extension );
  174. };
  175. free( ptr->Device->Security );
  176. };
  177. LOG("5");
  178. if ( ptr->Device->Extension ) {
  179. LOG("5a");
  180. free( ptr->Device->Extension );
  181. }
  182. LOG("6");
  183. free( ptr->Device );
  184. LOG("62");
  185. };
  186. LOG("C");
  187. if ( ptr->Events ) free( ptr->Events );
  188. LOG("D");
  189. if ( ptr->Imaging ) free( ptr->Imaging );
  190. LOG("E");
  191. if ( ptr->Media ){
  192. if ( ptr->Media->StreamingCapabilities ) {
  193. if ( ptr->Media->StreamingCapabilities->Extension ) free( ptr->Media->StreamingCapabilities->Extension );
  194. free( ptr->Media->StreamingCapabilities );
  195. };
  196. if ( ptr->Media->Extension ) {
  197. if ( ptr->Media->Extension->ProfileCapabilities ) free( ptr->Media->Extension->ProfileCapabilities );
  198. free( ptr->Media->Extension );
  199. };
  200. };
  201. LOG("F");
  202. if ( ptr->PTZ ) free( ptr->PTZ );
  203. LOG("G");
  204. if ( ptr->Extension ){
  205. if ( ptr->Extension->DeviceIO ) free( ptr->Extension->DeviceIO );
  206. if ( ptr->Extension->Display ) free( ptr->Extension->Display );
  207. if ( ptr->Extension->Recording ) free( ptr->Extension->Recording );
  208. if ( ptr->Extension->Search ) free( ptr->Extension->Search );
  209. if ( ptr->Extension->Replay ) free( ptr->Extension->Replay );
  210. if ( ptr->Extension->Receiver ) free( ptr->Extension->Receiver );
  211. if ( ptr->Extension->AnalyticsDevice ) {
  212. if ( ptr->Extension->AnalyticsDevice->Extension ) free( ptr->Extension->AnalyticsDevice->Extension );
  213. free(ptr->Extension->AnalyticsDevice);
  214. };
  215. if ( ptr->Extension->Extensions ) free( ptr->Extension->Extensions );
  216. free(ptr->Extension);
  217. };
  218. };
  219. pOnvif::~pOnvif()
  220. {
  221. #ifdef DEBUG
  222. LOG("Destructor begin");
  223. #endif
  224. if (m_pIpAddress)
  225. {
  226. LOG("1");
  227. free(m_pIpAddress);
  228. }
  229. if (m_pUsername)
  230. {
  231. LOG("2");
  232. free(m_pUsername);
  233. }
  234. if (m_pPassword)
  235. {
  236. LOG("3");
  237. free(m_pPassword);
  238. }
  239. //if (m_pMediaURI)
  240. //{
  241. // LOG("4");
  242. // free(m_pMediaURI);
  243. //}
  244. if (m_pSnapshotURI)
  245. {
  246. LOG("5");
  247. free(m_pSnapshotURI);
  248. }
  249. //if (m_pDeviceURI)
  250. //{
  251. // LOG("6");
  252. // free(m_pDeviceURI);
  253. //}
  254. //if (m_pPTZURI)
  255. //{
  256. // LOG("7");
  257. // free(m_pPTZURI);
  258. //}
  259. if (m_pBaseURI)
  260. {
  261. LOG("8");
  262. free(m_pBaseURI);
  263. }
  264. if (m_pProxyHost)
  265. {
  266. LOG("9");
  267. free(m_pProxyHost);
  268. }
  269. if (m_pProxyUsername)
  270. {
  271. LOG("10");
  272. free(m_pProxyUsername);
  273. }
  274. if (m_pProxyPassword)
  275. {
  276. LOG("11");
  277. free(m_pProxyPassword);
  278. }
  279. if (m_pLastResponse)
  280. {
  281. LOG("12");
  282. free(m_pLastResponse);
  283. }
  284. if (m_pDiscoveryBindIP)
  285. {
  286. LOG("13");
  287. free(m_pDiscoveryBindIP);
  288. }
  289. if (m_pDiscoveryMCastIP)
  290. {
  291. LOG("14");
  292. free(m_pDiscoveryMCastIP);
  293. }
  294. cleanNodeCapability( &m_sCapabilities );
  295. LOG("CNC Done!");
  296. if (m_pCURL)
  297. {
  298. #ifdef DEBUG
  299. LOG("Try Cleanup CURL!");
  300. #endif
  301. curl_easy_cleanup(m_pCURL);
  302. m_pCURL = NULL;
  303. };
  304. #ifdef DEBUG
  305. LOG("Destructor Done!");
  306. #endif
  307. }
  308. bool pOnvif::setProxyHost(CSTR proxyHost)
  309. {
  310. if (m_pProxyHost != NULL)
  311. {
  312. free(m_pProxyHost);
  313. }
  314. if (proxyHost == NULL || strlen(proxyHost) == 0)
  315. {
  316. m_pProxyHost = NULL;
  317. return true;
  318. };
  319. m_pProxyHost = (CSTR) malloc(strlen(proxyHost) + 1);
  320. if (m_pProxyHost == NULL)
  321. {
  322. return false;
  323. }
  324. memcpy(m_pProxyHost, proxyHost, strlen(proxyHost) + 1);
  325. return true;
  326. }
  327. CSTR pOnvif::getProxyHost()
  328. {
  329. return m_pProxyHost;
  330. }
  331. bool pOnvif::setProxyPort(int proxyPort)
  332. {
  333. m_nProxyPort = proxyPort;
  334. return true;
  335. }
  336. int pOnvif::getProxyPort(void)
  337. {
  338. return m_nProxyPort;
  339. }
  340. bool pOnvif::setProxyUsername(CSTR proxyUsername)
  341. {
  342. if (m_pProxyUsername != NULL)
  343. {
  344. free(m_pProxyUsername);
  345. }
  346. if (proxyUsername == NULL || strlen(proxyUsername) == 0)
  347. {
  348. m_pProxyUsername = NULL;
  349. return true;
  350. };
  351. m_pProxyUsername = (CSTR) malloc(strlen(proxyUsername) + 1);
  352. if (m_pProxyUsername == NULL)
  353. {
  354. return false;
  355. }
  356. memcpy(m_pProxyUsername, proxyUsername, strlen(proxyUsername) + 1);
  357. return true;
  358. }
  359. CSTR pOnvif::getProxyUsername(void)
  360. {
  361. return m_pProxyUsername;
  362. }
  363. bool pOnvif::setProxyPassword(CSTR proxyPassword)
  364. {
  365. if (m_pProxyPassword != NULL)
  366. {
  367. free(m_pProxyPassword);
  368. }
  369. if (proxyPassword == NULL || strlen(proxyPassword) == 0)
  370. {
  371. m_pProxyPassword = NULL;
  372. return true;
  373. };
  374. m_pProxyPassword = (CSTR) malloc(strlen(proxyPassword) + 1);
  375. if (m_pProxyPassword == NULL)
  376. {
  377. return false;
  378. }
  379. memcpy(m_pProxyPassword, proxyPassword, strlen(proxyPassword) + 1);
  380. return true;
  381. }
  382. CSTR pOnvif::getProxyPassword()
  383. {
  384. return m_pProxyPassword;
  385. }
  386. bool pOnvif::setUsername(CSTR username)
  387. {
  388. if (m_pUsername != NULL)
  389. {
  390. free(m_pUsername);
  391. }
  392. if (username == NULL || strlen(username) == 0)
  393. {
  394. m_pUsername = NULL;
  395. return true;
  396. };
  397. m_pUsername = (CSTR) malloc(strlen(username) + 1);
  398. if (m_pUsername == NULL)
  399. {
  400. return false;
  401. }
  402. memcpy(m_pUsername, username, strlen(username) + 1);
  403. return true;
  404. }
  405. CSTR pOnvif::getUsername(void)
  406. {
  407. return m_pUsername;
  408. }
  409. bool pOnvif::setPassword(CSTR password)
  410. {
  411. if (m_pPassword != NULL)
  412. {
  413. free(m_pPassword);
  414. }
  415. if (password == NULL || strlen(password) == 0)
  416. {
  417. m_pPassword = NULL;
  418. return true;
  419. };
  420. m_pPassword = (CSTR) malloc(strlen(password) + 1);
  421. if (m_pPassword == NULL)
  422. {
  423. return false;
  424. }
  425. memcpy(m_pPassword, password, strlen(password) + 1);
  426. return true;
  427. }
  428. CSTR pOnvif::getPassword(void)
  429. {
  430. return m_pPassword;
  431. }
  432. CSTR pOnvif::getDeviceUri(void)
  433. {
  434. return m_pDeviceURI;
  435. }
  436. bool pOnvif::setDeviceUri(CSTR deviceUri)
  437. {
  438. if (deviceUri == NULL || strlen(deviceUri) == 0)
  439. {
  440. m_pDeviceURI = NULL;
  441. return false;
  442. };
  443. if (strstr(deviceUri, "http") == NULL)
  444. {
  445. LOG_ERROR("Malformed device URI");
  446. return false;
  447. };
  448. if (m_pDeviceURI != NULL)
  449. {
  450. free(m_pDeviceURI);
  451. }
  452. m_pDeviceURI = (CSTR) malloc(strlen(deviceUri) + 1);
  453. if (m_pDeviceURI == NULL)
  454. {
  455. return false;
  456. }
  457. memcpy(m_pDeviceURI, deviceUri, strlen(deviceUri));
  458. m_pDeviceURI[strlen(deviceUri)] = (char) 0;
  459. // toDo: Must parsed Host/IP
  460. char * tT = strstr(m_pDeviceURI, "/");
  461. if (tT)
  462. {
  463. tT += 2;
  464. char * tB = strstr(tT, "/");
  465. int len = tB - tT + 1;
  466. m_pIpAddress = (CSTR) malloc(len);
  467. if (m_pIpAddress)
  468. {
  469. len--;
  470. memcpy(m_pIpAddress, tT, len);
  471. m_pIpAddress[len] = (char) 0;
  472. LOG(m_pIpAddress);
  473. };
  474. };
  475. return true;
  476. }
  477. CSTR pOnvif::getIPAddress(void)
  478. {
  479. return m_pIpAddress;
  480. }
  481. bool pOnvif::setIPAddress(CSTR ipAddress)
  482. {
  483. if (ipAddress == NULL || strlen(ipAddress) == 0)
  484. {
  485. m_pIpAddress = NULL;
  486. return false;
  487. };
  488. if (m_pIpAddress != NULL)
  489. {
  490. free(m_pIpAddress);
  491. }
  492. m_pIpAddress = (CSTR) malloc(strlen(ipAddress) + 1);
  493. if (m_pIpAddress == NULL)
  494. {
  495. return false;
  496. }
  497. memcpy(m_pIpAddress, ipAddress, strlen(ipAddress));
  498. m_pIpAddress[strlen(ipAddress)] = (char) 0;
  499. // ToDo: Must be created URI ... sprintf(tURL, "http://%s/onvif/device_service", m_pIpAddress);
  500. int len = strlen(ipAddress) + 28;
  501. m_pDeviceURI = (CSTR) malloc(len + 1);
  502. if (m_pDeviceURI)
  503. {
  504. sprintf(m_pDeviceURI, "http://%s/onvif/device_service", m_pIpAddress);
  505. LOG(m_pDeviceURI);
  506. };
  507. return true;
  508. }
  509. videoSources * pOnvif::getSources(void)
  510. {
  511. return &m_vVideoSources;
  512. }
  513. videoSourceProfiles * pOnvif::getProfiles(void)
  514. {
  515. return &m_vVideoProfiles;
  516. }
  517. videoSourceProfiles * pOnvif::getActiveProfiles(void)
  518. {
  519. return &m_vActiveSources;
  520. }
  521. CSTR pOnvif::getMediaUri(void)
  522. {
  523. return m_pMediaURI;
  524. }
  525. CSTR pOnvif::getPTZUri(void)
  526. {
  527. return m_pPTZURI;
  528. }
  529. CSTR pOnvif::getBaseUrl(void)
  530. {
  531. return m_pBaseURI;
  532. }
  533. void pOnvif::getSupportedVersion(void) {}
  534. nodeCapability * pOnvif::getCapabilities(void)
  535. {
  536. return &m_sCapabilities;
  537. }
  538. bool pOnvif::setBreakOnError(bool intransingent)
  539. {
  540. m_bIntransingent = intransingent;
  541. return true;
  542. }
  543. CSTR pOnvif::getLastResponse(void)
  544. {
  545. return m_pLastResponse;
  546. }
  547. bool pOnvif::setDiscoveryTimeout(int discoverytimeout)
  548. {
  549. m_nDiscoveryTimeout = discoverytimeout;
  550. return true;
  551. }
  552. bool pOnvif::setDiscoveryBindIp(CSTR discoverybindip)
  553. {
  554. if (m_pDiscoveryBindIP != NULL)
  555. {
  556. free(m_pDiscoveryBindIP);
  557. }
  558. if (discoverybindip == NULL || strlen(discoverybindip) == 0)
  559. {
  560. m_pDiscoveryBindIP = NULL;
  561. return true;
  562. };
  563. m_pDiscoveryBindIP = (CSTR) malloc(strlen(discoverybindip) + 1);
  564. if (m_pDiscoveryBindIP == NULL)
  565. {
  566. return false;
  567. }
  568. memcpy(m_pDiscoveryBindIP, discoverybindip, strlen(discoverybindip) + 1);
  569. return true;
  570. }
  571. bool pOnvif::setDiscoveryMcastIp(CSTR discoverymcastip)
  572. {
  573. if (m_pDiscoveryMCastIP != NULL)
  574. {
  575. free(m_pDiscoveryMCastIP);
  576. }
  577. if (discoverymcastip == NULL || strlen(discoverymcastip) == 0)
  578. {
  579. m_pDiscoveryMCastIP = NULL;
  580. return true;
  581. };
  582. m_pDiscoveryMCastIP = (CSTR) malloc(strlen(discoverymcastip) + 1);
  583. if (m_pDiscoveryMCastIP == NULL)
  584. {
  585. return false;
  586. }
  587. memcpy(m_pDiscoveryMCastIP, discoverymcastip, strlen(discoverymcastip) + 1);
  588. return true;
  589. }
  590. bool pOnvif::setDiscoveryMcastPort(int discoverymcastport)
  591. {
  592. m_nDiscoveryMCastPort = discoverymcastport;
  593. return true;
  594. }
  595. bool pOnvif::setDiscoveryHideDuplicates(bool discoveryhideduplicates)
  596. {
  597. m_bDiscoveryHideDuplicates = discoveryhideduplicates;
  598. return true;
  599. }
  600. CSTR pOnvif::getSnapshotUri(void)
  601. {
  602. return m_pSnapshotURI;
  603. }
  604. /*
  605. WS-Discovery
  606. https://www.geeksforgeeks.org/udp-server-client-implementation-c/
  607. */
  608. discoveryResults pOnvif::discover(void)
  609. {
  610. discoveryResults RetVal;
  611. time_t tTimeout = time(NULL) + m_nDiscoveryTimeout;
  612. CSTR tPostString = PONVIF_PACK_DISCOVERY;
  613. struct sockaddr_in tSockAddr;
  614. struct hostent * h_info;
  615. #ifdef __linux__
  616. int tSocket;
  617. #else
  618. int tSocket;
  619. #endif
  620. int RetCode;
  621. char Response[DEFAULT_BUFFER_SIZE];
  622. try
  623. {
  624. // SOL_UDP = 17
  625. tSocket = socket(AF_INET, SOCK_DGRAM, 0);
  626. if (tSocket < 0)
  627. {
  628. LOG_ERROR("ERROR creating socket");
  629. return RetVal;
  630. };
  631. LOG("Socket Created!");
  632. memset(&tSockAddr, 0, sizeof(struct sockaddr_in));
  633. h_info = gethostbyname(m_pDiscoveryBindIP);
  634. if (h_info == NULL)
  635. {
  636. LOG_ERROR("Some throuble with networking on this machine (Cannot Get Hostname)!");
  637. return RetVal;
  638. };
  639. LOG("Host Found!");
  640. //*****************************************
  641. //* there we building our network address *
  642. //*****************************************
  643. memcpy(h_info->h_addr, &(tSockAddr.sin_addr), h_info->h_length);
  644. tSockAddr.sin_family = h_info->h_addrtype;
  645. tSockAddr.sin_port = htons(20000 + (20000 * rand()) / RAND_MAX);
  646. RetCode = bind(tSocket, (const sockaddr *) &tSockAddr, sizeof(struct sockaddr_in));
  647. if (RetCode != 0)
  648. {
  649. LOG_ERROR("Error Binding to Port/Address");
  650. return RetVal;
  651. };
  652. LOG("Binding Done!");
  653. #ifdef __linux__
  654. // setsockopt( tSocket, IPPROTO_IP, MCAST_JOIN_GROUP, );
  655. int tVal = 1;
  656. setsockopt(tSocket, SOL_SOCKET, SO_BROADCAST, &tVal, sizeof(int));
  657. // socket_sendto($sock, $post_string, strlen(tPostString), 0, $this->discoverymcastip, $this->discoverymcastport);
  658. sendto(tSocket, tPostString, strlen(tPostString), 0, (const sockaddr *) &tSockAddr, sizeof(struct sockaddr_in));
  659. LOG("Broadcast Ping Sent!");
  660. fcntl(tSocket, F_SETFL, fcntl(tSocket, F_GETFL, 0) | O_NONBLOCK);
  661. LOG("Socket Set Not Bloking Mode!");
  662. #else
  663. // setsockopt( tSocket, IPPROTO_IP, MCAST_JOIN_GROUP, );
  664. bool tVal = 1;
  665. setsockopt(tSocket, SOL_SOCKET, SO_BROADCAST, (const char *) &tVal, sizeof(bool));
  666. // socket_sendto($sock, $post_string, strlen(tPostString), 0, $this->discoverymcastip, $this->discoverymcastport);
  667. sendto(tSocket, tPostString, strlen(tPostString), 0, (const sockaddr *) &tSockAddr, sizeof(struct sockaddr_in));
  668. LOG("Broadcast Ping Sent!");
  669. u_long arg = 1;
  670. if (ioctlsocket(tSocket, FIONBIO, &arg) < 0)
  671. {
  672. char tBuf[128];
  673. sprintf(tBuf, "Error ioctlsocket(..., FIONBIO) (%s)", strerror(errno));
  674. LOG_ERROR(tBuf);
  675. return RetVal;
  676. };
  677. #endif
  678. while (time(NULL) < tTimeout)
  679. {
  680. // n = recvfrom(sockfd, (char *)buffer, MAXLINE, MSG_WAITALL, (struct sockaddr *) &servaddr, &len);
  681. tVal = recvfrom(tSocket, Response, DEFAULT_BUFFER_SIZE, 0, NULL, NULL);
  682. if (tVal > 0)
  683. {
  684. Response[tVal] = '\0';
  685. // if( FALSE !== socket_recvfrom( $sock, $response, 9999, 0, $from, $this->discoverymcastport )){
  686. // if( Response != NULL && $response != $post_string){
  687. LOG(Response);
  688. XMLNode node = XMLNode::parseString(Response, "root");
  689. //$response = $this->_xml2array($response);
  690. // if(!isFault( node )){
  691. //$response['Envelope']['Body']['ProbeMatches']['ProbeMatch']['IPAddr'] = $from;
  692. if (m_bDiscoveryHideDuplicates)
  693. {
  694. // $result[$from] = $response['Envelope']['Body']['ProbeMatches']['ProbeMatch'];
  695. }
  696. else
  697. {
  698. // $result[] = $response['Envelope']['Body']['ProbeMatches']['ProbeMatch'];
  699. };
  700. // };
  701. //};
  702. //};
  703. };
  704. };
  705. #ifdef __linux__
  706. close(tSocket);
  707. #else
  708. closesocket(tSocket);
  709. #endif
  710. }
  711. catch ( const std::exception& e)
  712. {
  713. LOG_ERROR("Communication at Discovery Exception Catched!");
  714. };
  715. return RetVal;
  716. }
  717. /*
  718. Public functions (basic initialization method and other collaterals)
  719. */
  720. bool pOnvif::create(void){
  721. #ifdef DEBUG_EXTRA
  722. LOG("Get Instance m_pHttpAccessManager");
  723. #endif
  724. m_pHttpAccessManager = curlRequestsManager::getInstance();
  725. if (m_pHttpAccessManager == NULL) {
  726. return false;
  727. }
  728. // Device clock offset for the WS-Security Created timestamp (GetSystemDateAndTime needs no authentication).
  729. // If the device does not report UTC time, use our own clock (offset 0) instead of failing.
  730. m_nDeltaTime = 0;
  731. struct tm * tTS = core_GetSystemDateAndTime();
  732. if (tTS != NULL) {
  733. time_t tTimeStamp = timegm(tTS);
  734. m_nDeltaTime = time(NULL) - tTimeStamp;
  735. #ifdef DEBUG
  736. char tB[128];
  737. snprintf(tB, sizeof(tB), "Device UTC %04d-%02d-%02d %02d:%02d:%02d, offset %ld s", tTS->tm_year + 1900, tTS->tm_mon + 1, tTS->tm_mday, tTS->tm_hour, tTS->tm_min,
  738. tTS->tm_sec, (long) m_nDeltaTime);
  739. LOG(tB);
  740. #endif
  741. free(tTS);
  742. } else {
  743. LOG_ERROR("Device UTC time not available, using local clock for WS-Security timestamps");
  744. };
  745. if (! core_GetCapabilities())
  746. {
  747. LOG_ERROR("Error Getting Caps!");
  748. return false;
  749. };
  750. _getOnvifVersion(m_sCapabilities);
  751. if (media_GetVideoSources()){
  752. if (media_GetProfiles()){
  753. if (m_vVideoProfiles.empty()) {
  754. LOG_ERROR("Device has no media profiles!");
  755. return false;
  756. };
  757. return true;
  758. };
  759. };
  760. LOG_ERROR("Error Profiles!");
  761. return false;
  762. }
  763. /*
  764. Public wrappers for a subset of ONVIF primitives
  765. */
  766. // Returns the device UTC time (malloc'ed, caller frees) or NULL if not available.
  767. // UTCDateTime is optional in tt:SystemDateAndTime.
  768. struct tm * pOnvif::core_GetSystemDateAndTime(void)
  769. {
  770. char tURL[CTEXT];
  771. if (m_pDeviceURI != NULL)
  772. {
  773. snprintf(tURL, sizeof(tURL), "%s", m_pDeviceURI);
  774. }
  775. else if (m_pIpAddress != NULL)
  776. {
  777. snprintf(tURL, sizeof(tURL), "http://%s/onvif/device_service", m_pIpAddress);
  778. }
  779. else
  780. {
  781. return NULL;
  782. };
  783. char tBuffer[DEFAULT_BUFFER_SIZE];
  784. // Pre-auth operation: never send a security header
  785. snprintf(tBuffer, sizeof(tBuffer), "%s", PONVIF_PACK_GET_SYS_DTS);
  786. if (! _send_request(tURL, tBuffer, true))
  787. {
  788. LOG_ERROR("GetSystemDateAndTime: no valid answer");
  789. return NULL;
  790. }
  791. XMLResults tParseResults;
  792. XMLNode response = XMLNode::parseString(m_pLastResponse, "root", &tParseResults);
  793. if (tParseResults.error)
  794. {
  795. char tBuf[CTEXT];
  796. snprintf(tBuf, sizeof(tBuf), "XML Parse Error %d at %d:%d", tParseResults.error, tParseResults.nLine, tParseResults.nColumn);
  797. LOG_ERROR(tBuf);
  798. return NULL;
  799. }
  800. XMLNode tNode = response.getChildNode("Body", 0).getChildNode("GetSystemDateAndTimeResponse", 0).getChildNode("SystemDateAndTime", 0).getChildNode("UTCDateTime", 0);
  801. if (tNode.isEmpty())
  802. {
  803. LOG_ERROR("UTCDateTime is Not Found!");
  804. return NULL;
  805. }
  806. XMLNode ttNode = tNode.getChildNode("Time", 0);
  807. XMLNode dtNode = tNode.getChildNode("Date", 0);
  808. int tYear = safeAtoi(dtNode.getChildNode("Year", 0).getText(0));
  809. int tMonth = safeAtoi(dtNode.getChildNode("Month", 0).getText(0));
  810. int tDay = safeAtoi(dtNode.getChildNode("Day", 0).getText(0));
  811. if (tYear < 1970 || tMonth < 1 || tMonth > 12 || tDay < 1 || tDay > 31)
  812. {
  813. LOG_ERROR("UTCDateTime is invalid!");
  814. return NULL;
  815. }
  816. struct tm * RetVal = (struct tm *) malloc(sizeof(struct tm));
  817. if (RetVal == NULL)
  818. {
  819. return NULL;
  820. }
  821. memset(RetVal, 0, sizeof(struct tm));
  822. RetVal->tm_year = tYear - 1900;
  823. RetVal->tm_mon = tMonth - 1;
  824. RetVal->tm_mday = tDay;
  825. RetVal->tm_hour = safeAtoi(ttNode.getChildNode("Hour", 0).getText(0));
  826. RetVal->tm_min = safeAtoi(ttNode.getChildNode("Minute", 0).getText(0));
  827. RetVal->tm_sec = safeAtoi(ttNode.getChildNode("Second", 0).getText(0));
  828. RetVal->tm_isdst = 0;
  829. return RetVal;
  830. }
  831. // Based on https://www.onvif.org/ver10/device/wsdl/devicemgmt.wsdl
  832. bool pOnvif::core_GetCapabilities(void)
  833. {
  834. char tBuffer[DEFAULT_BUFFER_SIZE];
  835. char tURL[CTEXT];
  836. if (m_pDeviceURI != NULL)
  837. {
  838. snprintf(tURL, sizeof(tURL), "%s", m_pDeviceURI);
  839. }
  840. else
  841. {
  842. if (m_pIpAddress != NULL)
  843. {
  844. sprintf(tURL, "http://%s/onvif/device_service", m_pIpAddress);
  845. }
  846. else
  847. {
  848. return NULL;
  849. };
  850. };
  851. // char tSTR[CTEXT];
  852. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_GET_CAPABILITIES);
  853. // sprintf( tSTR, PONVIF_PCK_GET_CAPABILITIES, tTOKEN.USERNAME, tTOKEN.PASSDIGEST, tTOKEN.NONCE, tTOKEN.TIMESTAMP );
  854. // build_package( tBuffer, PONVIF_ENVELOPE_SIM, tSTR );
  855. if (_send_request(tURL, tBuffer))
  856. {
  857. XMLResults tParseResults;
  858. XMLNode response = XMLNode::parseString(m_pLastResponse, "root", &tParseResults);
  859. #ifdef DEBUG_ONVIF_PRINTOUT_MESSAGES
  860. LOG("RCPT:");
  861. printf("%s\n", m_pLastResponse);
  862. #endif
  863. if (tParseResults.error != eXMLErrorNone)
  864. {
  865. char tBuf[CTEXT];
  866. sprintf(tBuf, "XML Parse Error %d at %d:%d", tParseResults.error, tParseResults.nLine, tParseResults.nColumn);
  867. LOG_ERROR(tBuf);
  868. }
  869. else
  870. {
  871. XMLNode zNode = response.getChildNode("Body", 0);
  872. if (zNode.isEmpty())
  873. {
  874. return false;
  875. }
  876. XMLNode tNode = zNode.getChildNode("GetCapabilitiesResponse", 0);
  877. if (! tNode.isEmpty())
  878. {
  879. XMLNode tCaps = tNode.getChildNode("Capabilities", 0);
  880. if (! tCaps.isEmpty())
  881. {
  882. {
  883. XMLNode t = tCaps.getChildNode("Analytics", 0);
  884. if (! t.isEmpty())
  885. {
  886. m_sCapabilities.Analytics = (onvifAnalyticsCapabilities *) malloc(sizeof(onvifAnalyticsCapabilities));
  887. if (m_sCapabilities.Analytics != NULL)
  888. {
  889. memset(m_sCapabilities.Analytics, 0, sizeof(onvifAnalyticsCapabilities));
  890. {
  891. XMLNode c = t.getChildNode("XAddr", 0);
  892. safeCopy(m_sCapabilities.Analytics->XAddr, sizeof(m_sCapabilities.Analytics->XAddr), c.getText(0));
  893. }
  894. {
  895. XMLNode c = t.getChildNode("RuleSupport", 0);
  896. m_sCapabilities.Analytics->RuleSupport = checkBool(c.getText(0));
  897. }
  898. {
  899. XMLNode c = t.getChildNode("AnalyticsModuleSupport", 0);
  900. m_sCapabilities.Analytics->AnalyticsModuleSupport = checkBool(c.getText(0));
  901. }
  902. };
  903. };
  904. }
  905. {
  906. XMLNode t = tCaps.getChildNode("Device", 0);
  907. if (! t.isEmpty())
  908. {
  909. m_sCapabilities.Device = (onvifDeviceCapabilities *) malloc(sizeof(onvifDeviceCapabilities));
  910. if (m_sCapabilities.Device != NULL)
  911. {
  912. memset(m_sCapabilities.Device, 0, sizeof(onvifDeviceCapabilities));
  913. {
  914. XMLNode c = t.getChildNode("XAddr", 0);
  915. safeCopy(m_sCapabilities.Device->XAddr, sizeof(m_sCapabilities.Device->XAddr), c.getText(0));
  916. }
  917. {
  918. XMLNode c = t.getChildNode("Network", 0);
  919. if (! c.isEmpty())
  920. {
  921. m_sCapabilities.Device->Network = (onvifNetworkCapabilities *) malloc(sizeof(onvifNetworkCapabilities));
  922. if (m_sCapabilities.Device->Network != NULL)
  923. {
  924. memset(m_sCapabilities.Device->Network, 0, sizeof(onvifNetworkCapabilities));
  925. {
  926. XMLNode n = c.getChildNode("IPFilter", 0);
  927. m_sCapabilities.Device->Network->IPFilter = checkBool(n.getText(0));
  928. }
  929. {
  930. XMLNode n = c.getChildNode("ZeroConfiguration", 0);
  931. m_sCapabilities.Device->Network->ZeroConfiguration = checkBool(n.getText(0));
  932. }
  933. {
  934. XMLNode n = c.getChildNode("IPVersion6", 0);
  935. m_sCapabilities.Device->Network->IPVersion6 = checkBool(n.getText(0));
  936. }
  937. {
  938. XMLNode n = c.getChildNode("DynDNS", 0);
  939. m_sCapabilities.Device->Network->DynDNS = checkBool(n.getText(0));
  940. }
  941. {
  942. XMLNode n = c.getChildNode("Extension", 0);
  943. if (! n.isEmpty())
  944. {
  945. m_sCapabilities.Device->Network->Extension = (onvifNetworkCapabilitiesExtension *) malloc(sizeof(onvifNetworkCapabilitiesExtension));
  946. if (m_sCapabilities.Device->Network->Extension != NULL)
  947. {
  948. memset(m_sCapabilities.Device->Network->Extension, 0, sizeof(onvifNetworkCapabilitiesExtension));
  949. {
  950. XMLNode x = n.getChildNode("Dot11Configuration", 0);
  951. m_sCapabilities.Device->Network->Extension->Dot11Configuration = checkBool(x.getText(0));
  952. }
  953. };
  954. };
  955. }
  956. };
  957. };
  958. }
  959. {
  960. XMLNode c = t.getChildNode("System", 0);
  961. if (! c.isEmpty())
  962. {
  963. m_sCapabilities.Device->System = (onvifSystemCapabilities *) malloc(sizeof(onvifSystemCapabilities));
  964. if (m_sCapabilities.Device->System != NULL)
  965. {
  966. memset(m_sCapabilities.Device->System, 0, sizeof(onvifSystemCapabilities));
  967. {
  968. XMLNode n = c.getChildNode("DiscoveryResolve", 0);
  969. m_sCapabilities.Device->System->DiscoveryResolve = checkBool(n.getText(0));
  970. }
  971. {
  972. XMLNode n = c.getChildNode("DiscoveryBye", 0);
  973. m_sCapabilities.Device->System->DiscoveryBye = checkBool(n.getText(0));
  974. }
  975. {
  976. XMLNode n = c.getChildNode("RemoteDiscovery", 0);
  977. m_sCapabilities.Device->System->RemoteDiscovery = checkBool(n.getText(0));
  978. }
  979. {
  980. XMLNode n = c.getChildNode("SystemBackup", 0);
  981. m_sCapabilities.Device->System->SystemBackup = checkBool(n.getText(0));
  982. }
  983. {
  984. XMLNode n = c.getChildNode("SystemLogging", 0);
  985. m_sCapabilities.Device->System->SystemLogging = checkBool(n.getText(0));
  986. }
  987. {
  988. XMLNode n = c.getChildNode("FirmwareUpgrade", 0);
  989. m_sCapabilities.Device->System->FirmwareUpgrade = checkBool(n.getText(0));
  990. }
  991. {
  992. XMLNode n = c.getChildNode("SupportedVersions", 0);
  993. if (! n.isEmpty())
  994. {
  995. m_sCapabilities.Device->System->SupportedVersions = (onvifSupportedVersions *) malloc(sizeof(onvifSupportedVersions));
  996. if (m_sCapabilities.Device->System->SupportedVersions != NULL)
  997. {
  998. memset(m_sCapabilities.Device->System->SupportedVersions, 0, sizeof(onvifSupportedVersions));
  999. {
  1000. XMLNode x = n.getChildNode("Major", 0);
  1001. m_sCapabilities.Device->System->SupportedVersions->Major = safeAtoi(x.getText(0));
  1002. }
  1003. {
  1004. XMLNode x = n.getChildNode("Minor", 0);
  1005. m_sCapabilities.Device->System->SupportedVersions->Minor = safeAtoi(x.getText(0));
  1006. }
  1007. };
  1008. };
  1009. }
  1010. {
  1011. XMLNode n = c.getChildNode("Extension", 0);
  1012. if (! n.isEmpty())
  1013. {
  1014. m_sCapabilities.Device->System->Extension = (onvifSystemCapabilitiesExtension *) malloc(sizeof(onvifSystemCapabilitiesExtension));
  1015. if (m_sCapabilities.Device->System->Extension != NULL)
  1016. {
  1017. memset(m_sCapabilities.Device->System->Extension, 0, sizeof(onvifSystemCapabilitiesExtension));
  1018. {
  1019. XMLNode x = n.getChildNode("HttpFirmwareUpgrade", 0);
  1020. m_sCapabilities.Device->System->Extension->HttpFirmwareUpgrade = checkBool(x.getText(0));
  1021. }
  1022. {
  1023. XMLNode x = n.getChildNode("HttpSystemBackup", 0);
  1024. m_sCapabilities.Device->System->Extension->HttpSystemBackup = checkBool(x.getText(0));
  1025. }
  1026. {
  1027. XMLNode x = n.getChildNode("HttpSystemLogging", 0);
  1028. m_sCapabilities.Device->System->Extension->HttpSystemLogging = checkBool(x.getText(0));
  1029. }
  1030. {
  1031. XMLNode x = n.getChildNode("HttpSupportInformation", 0);
  1032. m_sCapabilities.Device->System->Extension->HttpSupportInformation = checkBool(x.getText(0));
  1033. }
  1034. };
  1035. };
  1036. }
  1037. };
  1038. };
  1039. }
  1040. {
  1041. XMLNode c = t.getChildNode("IO", 0);
  1042. if (! c.isEmpty())
  1043. {
  1044. m_sCapabilities.Device->IO = (onvifIOCapabilities *) malloc(sizeof(onvifIOCapabilities));
  1045. if (m_sCapabilities.Device->IO != NULL)
  1046. {
  1047. memset(m_sCapabilities.Device->IO, 0, sizeof(onvifIOCapabilities));
  1048. {
  1049. XMLNode n = c.getChildNode("InputConnectors", 0);
  1050. m_sCapabilities.Device->IO->InputConnectors = safeAtoi(n.getText(0));
  1051. }
  1052. {
  1053. XMLNode n = c.getChildNode("RelayOutputs", 0);
  1054. m_sCapabilities.Device->IO->RelayOutputs = safeAtoi(n.getText(0));
  1055. }
  1056. {
  1057. XMLNode n = c.getChildNode("Extension", 0);
  1058. if (! n.isEmpty())
  1059. {
  1060. m_sCapabilities.Device->IO->Extension = (onvifIOCapabilitiesExtension *) malloc(sizeof(onvifIOCapabilitiesExtension));
  1061. if (m_sCapabilities.Device->IO->Extension != NULL)
  1062. {
  1063. memset(m_sCapabilities.Device->IO->Extension, 0, sizeof(onvifIOCapabilitiesExtension));
  1064. {
  1065. XMLNode x = n.getChildNode("Auxiliary", 0);
  1066. m_sCapabilities.Device->IO->Extension->Auxiliary = checkBool(x.getText(0));
  1067. }
  1068. };
  1069. };
  1070. }
  1071. };
  1072. };
  1073. }
  1074. {
  1075. XMLNode c = t.getChildNode("Security", 0);
  1076. if (! c.isEmpty())
  1077. {
  1078. m_sCapabilities.Device->Security = (onvifSecurityCapabilities *) malloc(sizeof(onvifSecurityCapabilities));
  1079. if (m_sCapabilities.Device->Security != NULL)
  1080. {
  1081. memset(m_sCapabilities.Device->Security, 0, sizeof(onvifSecurityCapabilities));
  1082. {
  1083. XMLNode n = c.getChildNode("TLS1.1", 0);
  1084. m_sCapabilities.Device->Security->TLS1_1 = checkBool(n.getText(0));
  1085. }
  1086. {
  1087. XMLNode n = c.getChildNode("TLS1.2", 0);
  1088. m_sCapabilities.Device->Security->TLS1_2 = checkBool(n.getText(0));
  1089. }
  1090. {
  1091. XMLNode n = c.getChildNode("OnboardKeyGeneration", 0);
  1092. m_sCapabilities.Device->Security->OnboardKeyGeneration = checkBool(n.getText(0));
  1093. }
  1094. {
  1095. XMLNode n = c.getChildNode("AccessPolicyConfig", 0);
  1096. m_sCapabilities.Device->Security->AccessPolicyConfig = checkBool(n.getText(0));
  1097. }
  1098. {
  1099. XMLNode n = c.getChildNode("X.509Token", 0);
  1100. m_sCapabilities.Device->Security->X_509Token = checkBool(n.getText(0));
  1101. }
  1102. {
  1103. XMLNode n = c.getChildNode("SAMLToken", 0);
  1104. m_sCapabilities.Device->Security->SAMLToken = checkBool(n.getText(0));
  1105. }
  1106. {
  1107. XMLNode n = c.getChildNode("KerberosToken", 0);
  1108. m_sCapabilities.Device->Security->KerberosToken = checkBool(n.getText(0));
  1109. }
  1110. {
  1111. XMLNode n = c.getChildNode("RELToken", 0);
  1112. m_sCapabilities.Device->Security->RELToken = checkBool(n.getText(0));
  1113. }
  1114. {
  1115. XMLNode n = c.getChildNode("Extension", 0);
  1116. if (! n.isEmpty())
  1117. {
  1118. m_sCapabilities.Device->Security->Extension = (onvifSecurityCapabilitiesExtension *) malloc(sizeof(onvifSecurityCapabilitiesExtension));
  1119. if (m_sCapabilities.Device->Security->Extension != NULL)
  1120. {
  1121. memset(m_sCapabilities.Device->Security->Extension, 0, sizeof(onvifSecurityCapabilitiesExtension));
  1122. {
  1123. XMLNode x = n.getChildNode("TLS1.0", 0);
  1124. m_sCapabilities.Device->Security->Extension->TLS1_0 = checkBool(x.getText(0));
  1125. }
  1126. };
  1127. };
  1128. }
  1129. };
  1130. };
  1131. }
  1132. };
  1133. };
  1134. }
  1135. {
  1136. XMLNode t = tCaps.getChildNode("Events", 0);
  1137. if (! t.isEmpty())
  1138. {
  1139. m_sCapabilities.Events = (onvifEventCapabilities *) malloc(sizeof(onvifEventCapabilities));
  1140. if (m_sCapabilities.Events != NULL)
  1141. {
  1142. memset(m_sCapabilities.Events, 0, sizeof(onvifEventCapabilities));
  1143. {
  1144. XMLNode c = t.getChildNode("XAddr", 0);
  1145. safeCopy(m_sCapabilities.Events->XAddr, sizeof(m_sCapabilities.Events->XAddr), c.getText(0));
  1146. }
  1147. {
  1148. XMLNode c = t.getChildNode("WSSubscriptionPolicySupport", 0);
  1149. m_sCapabilities.Events->WSSubscriptionPolicySupport = checkBool(c.getText(0));
  1150. }
  1151. {
  1152. XMLNode c = t.getChildNode("WSPullPointSupport", 0);
  1153. m_sCapabilities.Events->WSPullPointSupport = checkBool(c.getText(0));
  1154. }
  1155. {
  1156. XMLNode c = t.getChildNode("WSPausableSubscriptionManagerInterfaceSupport", 0);
  1157. m_sCapabilities.Events->WSPausableSubscriptionManagerInterfaceSupport = checkBool(c.getText(0));
  1158. }
  1159. };
  1160. };
  1161. }
  1162. {
  1163. XMLNode t = tCaps.getChildNode("Imaging", 0);
  1164. if (! t.isEmpty())
  1165. {
  1166. m_sCapabilities.Imaging = (onvifImagingCapabilities *) malloc(sizeof(onvifImagingCapabilities));
  1167. if (m_sCapabilities.Imaging != NULL)
  1168. {
  1169. memset(m_sCapabilities.Imaging, 0, sizeof(onvifImagingCapabilities));
  1170. {
  1171. XMLNode c = t.getChildNode("XAddr", 0);
  1172. safeCopy(m_sCapabilities.Imaging->XAddr, sizeof(m_sCapabilities.Imaging->XAddr), c.getText(0));
  1173. }
  1174. };
  1175. };
  1176. }
  1177. {
  1178. XMLNode t = tCaps.getChildNode("Media", 0);
  1179. if (! t.isEmpty())
  1180. {
  1181. m_sCapabilities.Media = (onvifMediaCapabilities *) malloc(sizeof(onvifMediaCapabilities));
  1182. if (m_sCapabilities.Media != NULL)
  1183. {
  1184. memset(m_sCapabilities.Media, 0, sizeof(onvifMediaCapabilities));
  1185. {
  1186. XMLNode c = t.getChildNode("XAddr", 0);
  1187. safeCopy(m_sCapabilities.Media->XAddr, sizeof(m_sCapabilities.Media->XAddr), c.getText(0));
  1188. }
  1189. {
  1190. XMLNode c = t.getChildNode("StreamingCapabilities", 0);
  1191. if (! c.isEmpty())
  1192. {
  1193. m_sCapabilities.Media->StreamingCapabilities = (onvifRealTimeStreamingCapabilities *) malloc(sizeof(onvifRealTimeStreamingCapabilities));
  1194. if (m_sCapabilities.Media->StreamingCapabilities != NULL)
  1195. {
  1196. memset(m_sCapabilities.Media->StreamingCapabilities, 0, sizeof(onvifRealTimeStreamingCapabilities));
  1197. {
  1198. XMLNode n = c.getChildNode("RTPMulticast", 0);
  1199. m_sCapabilities.Media->StreamingCapabilities->RTPMulticast = checkBool(n.getText(0));
  1200. }
  1201. {
  1202. XMLNode n = c.getChildNode("RTP_TCP", 0);
  1203. m_sCapabilities.Media->StreamingCapabilities->RTP_TCP = checkBool(n.getText(0));
  1204. }
  1205. {
  1206. XMLNode n = c.getChildNode("RTP_RTSP_TCP", 0);
  1207. m_sCapabilities.Media->StreamingCapabilities->RTP_RTSP_TCP = checkBool(n.getText(0));
  1208. }
  1209. };
  1210. };
  1211. }
  1212. {
  1213. XMLNode c = t.getChildNode("Extension", 0);
  1214. if (! c.isEmpty())
  1215. {
  1216. m_sCapabilities.Media->Extension = (onvifMediaCapabilitiesExtension *) malloc(sizeof(onvifMediaCapabilitiesExtension));
  1217. if (m_sCapabilities.Media->Extension != NULL)
  1218. {
  1219. memset(m_sCapabilities.Media->Extension, 0, sizeof(onvifMediaCapabilitiesExtension));
  1220. {
  1221. XMLNode n = c.getChildNode("ProfileCapabilities", 0);
  1222. if (! n.isEmpty())
  1223. {
  1224. m_sCapabilities.Media->Extension->ProfileCapabilities = (onvifProfileCapabilities *) malloc(sizeof(onvifProfileCapabilities));
  1225. if (m_sCapabilities.Media->Extension->ProfileCapabilities != NULL)
  1226. {
  1227. memset(m_sCapabilities.Media->Extension->ProfileCapabilities, 0, sizeof(onvifProfileCapabilities));
  1228. {
  1229. XMLNode x = n.getChildNode("MaximumNumberOfProfiles", 0);
  1230. m_sCapabilities.Media->Extension->ProfileCapabilities->MaximumNumberOfProfiles = safeAtoi(x.getText(0));
  1231. }
  1232. };
  1233. };
  1234. }
  1235. };
  1236. };
  1237. }
  1238. };
  1239. };
  1240. }
  1241. {
  1242. XMLNode t = tCaps.getChildNode("PTZ", 0);
  1243. if (! t.isEmpty())
  1244. {
  1245. m_sCapabilities.PTZ = (onvifPTZCapabilities *) malloc(sizeof(onvifPTZCapabilities));
  1246. if (m_sCapabilities.PTZ != NULL)
  1247. {
  1248. memset(m_sCapabilities.PTZ, 0, sizeof(onvifPTZCapabilities));
  1249. {
  1250. XMLNode c = t.getChildNode("XAddr", 0);
  1251. safeCopy(m_sCapabilities.PTZ->XAddr, sizeof(m_sCapabilities.PTZ->XAddr), c.getText(0));
  1252. }
  1253. };
  1254. };
  1255. }
  1256. {
  1257. XMLNode t = tCaps.getChildNode("Extension", 0);
  1258. if (! t.isEmpty())
  1259. {
  1260. m_sCapabilities.Extension = (onvifCapabilitiesExtension *) malloc(sizeof(onvifCapabilitiesExtension));
  1261. if (m_sCapabilities.Extension != NULL)
  1262. {
  1263. memset(m_sCapabilities.Extension, 0, sizeof(onvifCapabilitiesExtension));
  1264. {
  1265. XMLNode c = t.getChildNode("DeviceIO", 0);
  1266. if (! c.isEmpty())
  1267. {
  1268. m_sCapabilities.Extension->DeviceIO = (onvifDeviceIOCapabilities *) malloc(sizeof(onvifDeviceIOCapabilities));
  1269. if (m_sCapabilities.Extension->DeviceIO != NULL)
  1270. {
  1271. memset(m_sCapabilities.Extension->DeviceIO, 0, sizeof(onvifDeviceIOCapabilities));
  1272. {
  1273. XMLNode n = c.getChildNode("XAddr", 0);
  1274. safeCopy(m_sCapabilities.Extension->DeviceIO->XAddr, sizeof(m_sCapabilities.Extension->DeviceIO->XAddr), n.getText(0));
  1275. }
  1276. {
  1277. XMLNode n = c.getChildNode("VideoSources", 0);
  1278. m_sCapabilities.Extension->DeviceIO->VideoSources = safeAtoi(n.getText(0));
  1279. }
  1280. {
  1281. XMLNode n = c.getChildNode("VideoOutputs", 0);
  1282. m_sCapabilities.Extension->DeviceIO->VideoOutputs = safeAtoi(n.getText(0));
  1283. }
  1284. {
  1285. XMLNode n = c.getChildNode("AudioSources", 0);
  1286. m_sCapabilities.Extension->DeviceIO->AudioSources = safeAtoi(n.getText(0));
  1287. }
  1288. {
  1289. XMLNode n = c.getChildNode("AudioOutputs", 0);
  1290. m_sCapabilities.Extension->DeviceIO->AudioOutputs = safeAtoi(n.getText(0));
  1291. }
  1292. {
  1293. XMLNode n = c.getChildNode("RelayOutputs", 0);
  1294. m_sCapabilities.Extension->DeviceIO->RelayOutputs = safeAtoi(n.getText(0));
  1295. }
  1296. };
  1297. };
  1298. }
  1299. {
  1300. XMLNode c = t.getChildNode("Display", 0);
  1301. if (! c.isEmpty())
  1302. {
  1303. m_sCapabilities.Extension->Display = (onvifDisplayCapabilities *) malloc(sizeof(onvifDisplayCapabilities));
  1304. if (m_sCapabilities.Extension->Display != NULL)
  1305. {
  1306. memset(m_sCapabilities.Extension->Display, 0, sizeof(onvifDisplayCapabilities));
  1307. {
  1308. XMLNode n = c.getChildNode("XAddr", 0);
  1309. safeCopy(m_sCapabilities.Extension->Display->XAddr, sizeof(m_sCapabilities.Extension->Display->XAddr), n.getText(0));
  1310. }
  1311. {
  1312. XMLNode n = c.getChildNode("FixedLayout", 0);
  1313. m_sCapabilities.Extension->Display->FixedLayout = checkBool(n.getText(0));
  1314. }
  1315. };
  1316. };
  1317. }
  1318. {
  1319. XMLNode c = t.getChildNode("Recording", 0);
  1320. if (! c.isEmpty())
  1321. {
  1322. m_sCapabilities.Extension->Recording = (onvifRecordingCapabilities *) malloc(sizeof(onvifRecordingCapabilities));
  1323. if (m_sCapabilities.Extension->Recording != NULL)
  1324. {
  1325. memset(m_sCapabilities.Extension->Recording, 0, sizeof(onvifRecordingCapabilities));
  1326. {
  1327. XMLNode n = c.getChildNode("XAddr", 0);
  1328. safeCopy(m_sCapabilities.Extension->Recording->XAddr, sizeof(m_sCapabilities.Extension->Recording->XAddr), n.getText(0));
  1329. }
  1330. {
  1331. XMLNode n = c.getChildNode("ReceiverSource", 0);
  1332. m_sCapabilities.Extension->Recording->ReceiverSource = checkBool(n.getText(0));
  1333. }
  1334. {
  1335. XMLNode n = c.getChildNode("MediaProfileSource", 0);
  1336. m_sCapabilities.Extension->Recording->MediaProfileSource = checkBool(n.getText(0));
  1337. }
  1338. {
  1339. XMLNode n = c.getChildNode("DynamicRecordings", 0);
  1340. m_sCapabilities.Extension->Recording->DynamicRecordings = checkBool(n.getText(0));
  1341. }
  1342. {
  1343. XMLNode n = c.getChildNode("DynamicTracks", 0);
  1344. m_sCapabilities.Extension->Recording->DynamicTracks = checkBool(n.getText(0));
  1345. }
  1346. {
  1347. XMLNode n = c.getChildNode("MaxStringLength", 0);
  1348. m_sCapabilities.Extension->Recording->MaxStringLength = safeAtoi(n.getText(0));
  1349. }
  1350. };
  1351. };
  1352. }
  1353. {
  1354. XMLNode c = t.getChildNode("Search", 0);
  1355. if (! c.isEmpty())
  1356. {
  1357. m_sCapabilities.Extension->Search = (onvifSearchCapabilities *) malloc(sizeof(onvifSearchCapabilities));
  1358. if (m_sCapabilities.Extension->Search != NULL)
  1359. {
  1360. memset(m_sCapabilities.Extension->Search, 0, sizeof(onvifSearchCapabilities));
  1361. {
  1362. XMLNode n = c.getChildNode("XAddr", 0);
  1363. safeCopy(m_sCapabilities.Extension->Search->XAddr, sizeof(m_sCapabilities.Extension->Search->XAddr), n.getText(0));
  1364. }
  1365. {
  1366. XMLNode n = c.getChildNode("MetadataSearch", 0);
  1367. m_sCapabilities.Extension->Search->MetadataSearch = checkBool(n.getText(0));
  1368. }
  1369. };
  1370. };
  1371. }
  1372. {
  1373. XMLNode c = t.getChildNode("Replay", 0);
  1374. if (! c.isEmpty())
  1375. {
  1376. m_sCapabilities.Extension->Replay = (onvifReplayCapabilities *) malloc(sizeof(onvifReplayCapabilities));
  1377. if (m_sCapabilities.Extension->Replay != NULL)
  1378. {
  1379. memset(m_sCapabilities.Extension->Replay, 0, sizeof(onvifReplayCapabilities));
  1380. {
  1381. XMLNode n = c.getChildNode("XAddr", 0);
  1382. safeCopy(m_sCapabilities.Extension->Replay->XAddr, sizeof(m_sCapabilities.Extension->Replay->XAddr), n.getText(0));
  1383. }
  1384. };
  1385. };
  1386. }
  1387. {
  1388. XMLNode c = t.getChildNode("Receiver", 0);
  1389. if (! c.isEmpty())
  1390. {
  1391. m_sCapabilities.Extension->Receiver = (onvifReceiverCapabilities *) malloc(sizeof(onvifReceiverCapabilities));
  1392. if (m_sCapabilities.Extension->Receiver != NULL)
  1393. {
  1394. memset(m_sCapabilities.Extension->Receiver, 0, sizeof(onvifReceiverCapabilities));
  1395. {
  1396. XMLNode n = c.getChildNode("XAddr", 0);
  1397. safeCopy(m_sCapabilities.Extension->Receiver->XAddr, sizeof(m_sCapabilities.Extension->Receiver->XAddr), n.getText(0));
  1398. }
  1399. {
  1400. XMLNode n = c.getChildNode("RTP_Multicast", 0);
  1401. m_sCapabilities.Extension->Receiver->RTP_Multicast = checkBool(n.getText(0));
  1402. }
  1403. {
  1404. XMLNode n = c.getChildNode("RTP_TCP", 0);
  1405. m_sCapabilities.Extension->Receiver->RTP_TCP = checkBool(n.getText(0));
  1406. }
  1407. {
  1408. XMLNode n = c.getChildNode("RTP_RTSP_TCP", 0);
  1409. m_sCapabilities.Extension->Receiver->RTP_RTSP_TCP = checkBool(n.getText(0));
  1410. }
  1411. {
  1412. XMLNode n = c.getChildNode("SupportedReceivers", 0);
  1413. m_sCapabilities.Extension->Receiver->SupportedReceivers = safeAtoi(n.getText(0));
  1414. }
  1415. {
  1416. XMLNode n = c.getChildNode("MaximumRTSPURILength", 0);
  1417. m_sCapabilities.Extension->Receiver->MaximumRTSPURILength = safeAtoi(n.getText(0));
  1418. }
  1419. };
  1420. };
  1421. }
  1422. {
  1423. XMLNode c = t.getChildNode("AnalyticsDevice", 0);
  1424. if (! c.isEmpty())
  1425. {
  1426. m_sCapabilities.Extension->AnalyticsDevice = (onvifAnalyticsDeviceCapabilities *) malloc(sizeof(onvifAnalyticsDeviceCapabilities));
  1427. if (m_sCapabilities.Extension->AnalyticsDevice != NULL)
  1428. {
  1429. memset(m_sCapabilities.Extension->AnalyticsDevice, 0, sizeof(onvifAnalyticsDeviceCapabilities));
  1430. {
  1431. XMLNode n = c.getChildNode("XAddr", 0);
  1432. safeCopy(m_sCapabilities.Extension->AnalyticsDevice->XAddr, sizeof(m_sCapabilities.Extension->AnalyticsDevice->XAddr), n.getText(0));
  1433. }
  1434. {
  1435. XMLNode n = c.getChildNode("RuleSupport", 0);
  1436. m_sCapabilities.Extension->AnalyticsDevice->RuleSupport = checkBool(n.getText(0));
  1437. }
  1438. };
  1439. };
  1440. }
  1441. };
  1442. };
  1443. }
  1444. return true;
  1445. }
  1446. else
  1447. {
  1448. LOG("Capabilities is Empty!");
  1449. };
  1450. }
  1451. else
  1452. {
  1453. LOG("GetCapabilitiesResponse is Empty!");
  1454. };
  1455. };
  1456. }
  1457. return false;
  1458. }
  1459. // based on https://www.onvif.org/ver20/imaging/wsdl/imaging.wsdl
  1460. bool pOnvif::media_GetVideoSources(void)
  1461. {
  1462. if (m_pMediaURI == NULL)
  1463. {
  1464. return false;
  1465. }
  1466. char tBuffer[DEFAULT_BUFFER_SIZE];
  1467. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_GET_VIDEO_SOURCES);
  1468. if (_send_request(m_pMediaURI, tBuffer))
  1469. {
  1470. XMLResults tParseResults;
  1471. XMLNode response = XMLNode::parseString(m_pLastResponse, "root", &tParseResults);
  1472. #ifdef DEBUG_ONVIF_PRINTOUT_MESSAGES
  1473. LOG("RCPT:");
  1474. printf("%s\n", m_pLastResponse);
  1475. #endif
  1476. if (tParseResults.error)
  1477. {
  1478. char tBuf[CTEXT];
  1479. sprintf(tBuf, "XML Parse Error %d at %d:%d", tParseResults.error, tParseResults.nLine, tParseResults.nColumn);
  1480. LOG_ERROR(tBuf);
  1481. }
  1482. else
  1483. {
  1484. XMLNode zNode = response.getChildNode("Body", 0);
  1485. if (zNode.isEmpty())
  1486. {
  1487. return false;
  1488. }
  1489. XMLNode tNode = zNode.getChildNode("GetVideoSourcesResponse", 0);
  1490. if (! tNode.isEmpty())
  1491. {
  1492. for (int index = 0; index < tNode.nChildNode(); index++)
  1493. {
  1494. XMLNode cNode = tNode.getChildNode("VideoSources", index);
  1495. if (! cNode.isEmpty())
  1496. {
  1497. videoSource * tPtr;
  1498. tPtr = (videoSource *) malloc(sizeof(videoSource));
  1499. if (tPtr != NULL)
  1500. {
  1501. // Imaging / Extension are optional: must be NULL when the device leaves them out
  1502. memset(tPtr, 0, sizeof(videoSource));
  1503. safeCopy(tPtr->token, sizeof(tPtr->token), cNode.getAttribute("token", 0));
  1504. {
  1505. XMLNode nNode = cNode.getChildNode("Framerate", 0);
  1506. tPtr->Framerate = safeAtof(nNode.getText(0));
  1507. }
  1508. {
  1509. XMLNode nNode = cNode.getChildNode("Resolution", 0);
  1510. if (! nNode.isEmpty())
  1511. {
  1512. {
  1513. XMLNode xNode = nNode.getChildNode("Width", 0);
  1514. tPtr->Resolution.Width = safeAtoi(xNode.getText(0));
  1515. }
  1516. {
  1517. XMLNode xNode = nNode.getChildNode("Height", 0);
  1518. tPtr->Resolution.Height = safeAtoi(xNode.getText(0));
  1519. }
  1520. };
  1521. }
  1522. {
  1523. XMLNode nNode = cNode.getChildNode("Imaging", 0);
  1524. if (! nNode.isEmpty())
  1525. {
  1526. tPtr->Imaging = (onvifImagingSettings *) malloc(sizeof(onvifImagingSettings));
  1527. if (tPtr->Imaging != NULL)
  1528. {
  1529. memset(tPtr->Imaging, 0, sizeof(onvifImagingSettings));
  1530. {
  1531. XMLNode xNode = nNode.getChildNode("BacklightCompensation", 0);
  1532. if (! xNode.isEmpty())
  1533. {
  1534. tPtr->Imaging->BacklightCompensation = (onvifBacklightCompensation *) malloc(sizeof(onvifBacklightCompensation));
  1535. if (tPtr->Imaging->BacklightCompensation != NULL)
  1536. {
  1537. memset(tPtr->Imaging->BacklightCompensation, 0, sizeof(onvifBacklightCompensation));
  1538. {
  1539. XMLNode rNode = xNode.getChildNode("Mode", 0);
  1540. tPtr->Imaging->BacklightCompensation->Mode = checkOnOff(rNode.getText(0));
  1541. }
  1542. {
  1543. XMLNode rNode = xNode.getChildNode("Level", 0);
  1544. tPtr->Imaging->BacklightCompensation->Level = safeAtof(rNode.getText(0));
  1545. }
  1546. };
  1547. };
  1548. }
  1549. {
  1550. XMLNode xNode = nNode.getChildNode("Brightness", 0);
  1551. tPtr->Imaging->Brightness = safeAtof(xNode.getText(0));
  1552. }
  1553. {
  1554. XMLNode xNode = nNode.getChildNode("ColorSaturation", 0);
  1555. tPtr->Imaging->ColorSaturation = safeAtof(xNode.getText(0));
  1556. }
  1557. {
  1558. XMLNode xNode = nNode.getChildNode("Contrast", 0);
  1559. tPtr->Imaging->Contrast = safeAtof(xNode.getText(0));
  1560. }
  1561. {
  1562. XMLNode xNode = nNode.getChildNode("Sharpness", 0);
  1563. tPtr->Imaging->Sharpness = safeAtof(xNode.getText(0));
  1564. }
  1565. {
  1566. XMLNode xNode = nNode.getChildNode("IrCutFilter", 0);
  1567. tPtr->Imaging->IrCutFilter = checkOnOffAuto(xNode.getText(0));
  1568. }
  1569. };
  1570. };
  1571. }
  1572. m_vVideoSources.push_back(tPtr);
  1573. };
  1574. };
  1575. };
  1576. return true;
  1577. }
  1578. else
  1579. {
  1580. LOG_ERROR("GetVideoSourcesResponse EMPTY!");
  1581. };
  1582. };
  1583. }
  1584. else
  1585. {
  1586. LOG_ERROR("_send_request Failure!");
  1587. };
  1588. return false;
  1589. }
  1590. bool pOnvif::media_GetProfiles(void)
  1591. {
  1592. char tBuffer[DEFAULT_BUFFER_SIZE];
  1593. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_GET_PROFILES);
  1594. if (_send_request(m_pMediaURI, tBuffer))
  1595. {
  1596. XMLResults tParseResults;
  1597. XMLNode response = XMLNode::parseString(m_pLastResponse, "root", &tParseResults);
  1598. #ifdef DEBUG_ONVIF_PRINTOUT_MESSAGES
  1599. LOG("RCPT:");
  1600. printf("%s\n", m_pLastResponse);
  1601. #endif
  1602. if (tParseResults.error)
  1603. {
  1604. char tBuf[CTEXT];
  1605. sprintf(tBuf, "XML Parse Error %d at %d:%d", tParseResults.error, tParseResults.nLine, tParseResults.nColumn);
  1606. LOG_ERROR(tBuf);
  1607. }
  1608. else
  1609. {
  1610. XMLNode zNode = response.getChildNode("Body", 0);
  1611. if (zNode.isEmpty())
  1612. {
  1613. return false;
  1614. }
  1615. XMLNode tNode = zNode.getChildNode("GetProfilesResponse", 0);
  1616. if (! tNode.isEmpty())
  1617. {
  1618. for (int index = 0; index < tNode.nChildNode(); index++)
  1619. {
  1620. XMLNode cNode = tNode.getChildNode("Profiles", index);
  1621. if (! cNode.isEmpty())
  1622. {
  1623. videoSourceProfile * tPtr;
  1624. tPtr = (videoSourceProfile *) malloc(sizeof(videoSourceProfile));
  1625. if (tPtr != NULL)
  1626. {
  1627. memset(tPtr, 0, sizeof(videoSourceProfile));
  1628. safeCopy(tPtr->profiletoken, sizeof(tPtr->profiletoken), cNode.getAttribute("token", 0));
  1629. {
  1630. XMLNode nNode = cNode.getChildNode("Name", 0);
  1631. safeCopy(tPtr->profilename, sizeof(tPtr->profilename), nNode.getText(0));
  1632. }
  1633. {
  1634. XMLNode nNode = cNode.getChildNode("VideoSourceConfiguration", 0);
  1635. if (! nNode.isEmpty())
  1636. {
  1637. XMLNode zNode = nNode.getChildNode("SourceToken", 0);
  1638. safeCopy(tPtr->sourcetoken, sizeof(tPtr->sourcetoken), zNode.getText(0));
  1639. };
  1640. }
  1641. {
  1642. XMLNode nNode = cNode.getChildNode("VideoEncoderConfiguration", 0);
  1643. if (! nNode.isEmpty())
  1644. {
  1645. {
  1646. XMLNode zNode = nNode.getChildNode("Encoding", 0);
  1647. safeCopy(tPtr->encoding, sizeof(tPtr->encoding), zNode.getText(0));
  1648. }
  1649. {
  1650. XMLNode zNode = nNode.getChildNode("Resolution", 0);
  1651. {
  1652. XMLNode jNode = zNode.getChildNode("Width", 0);
  1653. tPtr->width = safeAtoi(jNode.getText(0));
  1654. }
  1655. {
  1656. XMLNode jNode = zNode.getChildNode("Height", 0);
  1657. tPtr->height = safeAtoi(jNode.getText(0));
  1658. }
  1659. }
  1660. {
  1661. XMLNode zNode = nNode.getChildNode("RateControl", 0);
  1662. {
  1663. XMLNode jNode = zNode.getChildNode("FrameRateLimit", 0);
  1664. tPtr->fps = safeAtoi(jNode.getText(0));
  1665. }
  1666. {
  1667. XMLNode jNode = zNode.getChildNode("BitrateLimit", 0);
  1668. tPtr->bitrate = safeAtoi(jNode.getText(0));
  1669. }
  1670. }
  1671. };
  1672. }
  1673. {
  1674. // PTZ operations need a profile that contains a PTZConfiguration
  1675. XMLNode nNode = cNode.getChildNode("PTZConfiguration", 0);
  1676. if (! nNode.isEmpty())
  1677. {
  1678. tPtr->ptz = true;
  1679. safeCopy(tPtr->ptznodetoken, sizeof(tPtr->ptznodetoken), nNode.getChildNode("NodeToken", 0).getText(0));
  1680. };
  1681. }
  1682. m_vVideoProfiles.push_back(tPtr);
  1683. };
  1684. };
  1685. };
  1686. return true;
  1687. };
  1688. };
  1689. };
  1690. return false;
  1691. }
  1692. bool pOnvif::media_GetServices(void)
  1693. {
  1694. char tBuffer[DEFAULT_BUFFER_SIZE];
  1695. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_GET_SERVICES);
  1696. // Device service operation: goes to the device service, not to the media service
  1697. if (_send_request(m_pDeviceURI, tBuffer))
  1698. {
  1699. XMLResults tParseResults;
  1700. XMLNode response = XMLNode::parseString(m_pLastResponse, "root", &tParseResults);
  1701. LOG("RCPT:");
  1702. printf("%s\n", m_pLastResponse);
  1703. if (tParseResults.error)
  1704. {
  1705. char tBuf[CTEXT];
  1706. sprintf(tBuf, "XML Parse Error %d at %d:%d", tParseResults.error, tParseResults.nLine, tParseResults.nColumn);
  1707. LOG_ERROR(tBuf);
  1708. }
  1709. else
  1710. {
  1711. };
  1712. };
  1713. return false;
  1714. }
  1715. bool pOnvif::core_GetDeviceInformation()
  1716. {
  1717. char tBuffer[DEFAULT_BUFFER_SIZE];
  1718. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_GET_DEV_INFO);
  1719. // Device service operation: goes to the device service, not to the media service
  1720. if (_send_request(m_pDeviceURI, tBuffer))
  1721. {
  1722. XMLResults tParseResults;
  1723. XMLNode response = XMLNode::parseString(m_pLastResponse, "root", &tParseResults);
  1724. LOG("RCPT:");
  1725. printf("%s\n", m_pLastResponse);
  1726. if (tParseResults.error)
  1727. {
  1728. char tBuf[CTEXT];
  1729. sprintf(tBuf, "XML Parse Error %d at %d:%d", tParseResults.error, tParseResults.nLine, tParseResults.nColumn);
  1730. LOG_ERROR(tBuf);
  1731. }
  1732. else
  1733. {
  1734. // return $response['Envelope']['Body']['GetDeviceInformationResponse'];
  1735. };
  1736. };
  1737. return false;
  1738. }
  1739. CSTR pOnvif::media_GetStreamUri(CSTR profileToken, CSTR stream, CSTR protocol)
  1740. {
  1741. char tBuffer[DEFAULT_BUFFER_SIZE];
  1742. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_GET_STREAM_URI, xesc(stream).c_str(), xesc(protocol).c_str(), xesc(profileToken).c_str());
  1743. if (_send_request(m_pMediaURI, tBuffer))
  1744. {
  1745. XMLResults tParseResults;
  1746. XMLNode response = XMLNode::parseString(m_pLastResponse, "root", &tParseResults);
  1747. LOG("RCPT:");
  1748. printf("%s\n", m_pLastResponse);
  1749. if (tParseResults.error)
  1750. {
  1751. char tBuf[CTEXT];
  1752. sprintf(tBuf, "XML Parse Error %d at %d:%d", tParseResults.error, tParseResults.nLine, tParseResults.nColumn);
  1753. LOG_ERROR(tBuf);
  1754. }
  1755. else
  1756. {
  1757. // Parse
  1758. // return $response['Envelope']['Body']['GetStreamUriResponse']['MediaUri']['Uri'];
  1759. };
  1760. };
  1761. return NULL;
  1762. }
  1763. CSTR pOnvif::media_GetSnapshotUri(CSTR profileToken)
  1764. {
  1765. char tBuffer[DEFAULT_BUFFER_SIZE];
  1766. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_GET_SNAPSHOT_URI, xesc(profileToken).c_str());
  1767. if (_send_request(m_pMediaURI, tBuffer))
  1768. {
  1769. XMLResults tParseResults;
  1770. XMLNode response = XMLNode::parseString(m_pLastResponse, "root", &tParseResults);
  1771. LOG("RCPT:");
  1772. printf("%s\n", m_pLastResponse);
  1773. if (tParseResults.error)
  1774. {
  1775. char tBuf[CTEXT];
  1776. sprintf(tBuf, "XML Parse Error %d at %d:%d", tParseResults.error, tParseResults.nLine, tParseResults.nColumn);
  1777. LOG_ERROR(tBuf);
  1778. }
  1779. else
  1780. {
  1781. // Parse
  1782. // return $response['Envelope']['Body']['GetSnapshotUriResponse']['MediaUri']['Uri'];
  1783. };
  1784. };
  1785. return NULL;
  1786. }
  1787. /*
  1788. Parses a tt:MoveStatus axis value. Returns 1 = MOVING, 0 = IDLE, -1 = UNKNOWN / not reported.
  1789. */
  1790. static int parseMoveStatusValue(XMLNode & node)
  1791. {
  1792. if (node.isEmpty())
  1793. {
  1794. return -1;
  1795. }
  1796. LPCTSTR tText = node.getText(0);
  1797. if (tText == NULL)
  1798. {
  1799. return -1;
  1800. }
  1801. if (strstr(tText, "MOVING") != NULL)
  1802. {
  1803. return 1;
  1804. }
  1805. if (strstr(tText, "IDLE") != NULL)
  1806. {
  1807. return 0;
  1808. }
  1809. return -1;
  1810. }
  1811. /*
  1812. ONVIF PTZ GetStatus.
  1813. Position and MoveStatus are both optional in tt:PTZStatus, and inside them every axis is optional,
  1814. so every element is checked before it is read; tStatus->has* tells the caller what the camera reported.
  1815. An axis whose MoveStatus is not reported is counted as idle.
  1816. */
  1817. bool pOnvif::ptz_GetStatus(CSTR profileToken, ptzStatus * tStatus)
  1818. {
  1819. if (m_pPTZURI == NULL)
  1820. {
  1821. return false;
  1822. }
  1823. if (tStatus == NULL)
  1824. {
  1825. return false;
  1826. }
  1827. char tBuffer[DEFAULT_BUFFER_SIZE];
  1828. memset(tStatus, 0, sizeof(ptzStatus));
  1829. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_GET_PTZ_STATUS, xesc(profileToken).c_str());
  1830. if (! _send_request(m_pPTZURI, tBuffer, true))
  1831. {
  1832. return false;
  1833. }
  1834. XMLResults tParseResults;
  1835. XMLNode response = XMLNode::parseString(m_pLastResponse, "root", &tParseResults);
  1836. if (tParseResults.error)
  1837. {
  1838. char tBuf[CTEXT];
  1839. sprintf(tBuf, "XML Parse Error %d at %d:%d", tParseResults.error, tParseResults.nLine, tParseResults.nColumn);
  1840. LOG_ERROR(tBuf);
  1841. return false;
  1842. }
  1843. XMLNode aNode = response.getChildNode("Body", 0);
  1844. if (aNode.isEmpty())
  1845. {
  1846. return false;
  1847. }
  1848. XMLNode bNode = aNode.getChildNode("GetStatusResponse", 0);
  1849. if (bNode.isEmpty())
  1850. {
  1851. // SOAP Fault or unexpected answer
  1852. return false;
  1853. }
  1854. XMLNode cNode = bNode.getChildNode("PTZStatus", 0);
  1855. if (cNode.isEmpty())
  1856. {
  1857. return false;
  1858. }
  1859. XMLNode dNode = cNode.getChildNode("Position", 0);
  1860. if (! dNode.isEmpty())
  1861. {
  1862. XMLNode eNode = dNode.getChildNode("PanTilt", 0);
  1863. if (! eNode.isEmpty())
  1864. {
  1865. LPCTSTR tX = eNode.getAttribute("x");
  1866. LPCTSTR tY = eNode.getAttribute("y");
  1867. if (tX != NULL && tY != NULL)
  1868. {
  1869. tStatus->pan = (float) atof(tX);
  1870. tStatus->tilt = (float) atof(tY);
  1871. tStatus->hasPosition = true;
  1872. };
  1873. };
  1874. XMLNode fNode = dNode.getChildNode("Zoom", 0);
  1875. if (! fNode.isEmpty())
  1876. {
  1877. LPCTSTR tX = fNode.getAttribute("x");
  1878. if (tX != NULL)
  1879. {
  1880. tStatus->zoom = (float) atof(tX);
  1881. tStatus->hasZoomPosition = true;
  1882. };
  1883. };
  1884. };
  1885. XMLNode gNode = cNode.getChildNode("MoveStatus", 0);
  1886. if (! gNode.isEmpty())
  1887. {
  1888. XMLNode hNode = gNode.getChildNode("PanTilt", 0);
  1889. XMLNode iNode = gNode.getChildNode("Zoom", 0);
  1890. int tPT = parseMoveStatusValue(hNode);
  1891. int tZM = parseMoveStatusValue(iNode);
  1892. // Only a real IDLE / MOVING value counts as "reported"
  1893. tStatus->hasMoveStatus = (tPT >= 0 || tZM >= 0);
  1894. tStatus->PanTiltIdle = (tPT != 1);
  1895. tStatus->ZoomIdle = (tZM != 1);
  1896. tStatus->isMoving = (tPT == 1 || tZM == 1);
  1897. };
  1898. return true;
  1899. }
  1900. bool pOnvif::ptz_GetServiceCapabilities(int8_t * moveStatus, int8_t * statusPosition)
  1901. {
  1902. if (moveStatus)
  1903. {
  1904. *moveStatus = -1;
  1905. }
  1906. if (statusPosition)
  1907. {
  1908. *statusPosition = -1;
  1909. }
  1910. if (m_pPTZURI == NULL)
  1911. {
  1912. return false;
  1913. }
  1914. char tBuffer[DEFAULT_BUFFER_SIZE];
  1915. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_PTZ_GET_SERVICE_CAPS);
  1916. if (! _send_request(m_pPTZURI, tBuffer, true))
  1917. {
  1918. return false;
  1919. }
  1920. XMLResults tParseResults;
  1921. XMLNode response = XMLNode::parseString(m_pLastResponse, "root", &tParseResults);
  1922. if (tParseResults.error)
  1923. {
  1924. return false;
  1925. }
  1926. XMLNode aNode = response.getChildNode("Body", 0);
  1927. if (aNode.isEmpty())
  1928. {
  1929. return false;
  1930. }
  1931. XMLNode bNode = aNode.getChildNode("GetServiceCapabilitiesResponse", 0);
  1932. if (bNode.isEmpty())
  1933. {
  1934. // Older devices (PTZ service < 2.x) answer with a SOAP Fault
  1935. return false;
  1936. }
  1937. XMLNode cNode = bNode.getChildNode("Capabilities", 0);
  1938. if (cNode.isEmpty())
  1939. {
  1940. return false;
  1941. }
  1942. LPCTSTR tMS = cNode.getAttribute("MoveStatus");
  1943. LPCTSTR tSP = cNode.getAttribute("StatusPosition");
  1944. if (moveStatus && tMS != NULL)
  1945. {
  1946. *moveStatus = checkBool(tMS) ? 1 : 0;
  1947. }
  1948. if (statusPosition && tSP != NULL)
  1949. {
  1950. *statusPosition = checkBool(tSP) ? 1 : 0;
  1951. }
  1952. return true;
  1953. }
  1954. bool pOnvif::ptz_GetPresets(CSTR profileToken)
  1955. {
  1956. if (m_pPTZURI == NULL)
  1957. {
  1958. return false;
  1959. }
  1960. char tBuffer[DEFAULT_BUFFER_SIZE];
  1961. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_GET_PRESETS, xesc(profileToken).c_str());
  1962. if (_send_request(m_pPTZURI, tBuffer))
  1963. {
  1964. // XMLResults tParseResults;
  1965. // XMLNode response = XMLNode::parseString( m_pLastResponse, "root", &tParseResults );
  1966. // LOG("RCPT:");
  1967. // LOG( m_pLastResponse );
  1968. // if( tParseResults.error ){
  1969. // char tBuf[CTEXT];
  1970. // sprintf( tBuf, "XML Parse Error %d at %d:%d", tParseResults.error, tParseResults.nLine, tParseResults.nColumn );
  1971. // LOG_ERROR( tBuf );
  1972. // } else {
  1973. //$getpresetsresponse=$response['Envelope']['Body']['GetPresetsResponse']['Preset'];
  1974. //$presets=array();
  1975. // foreach ($getpresetsresponse as $preset) {
  1976. // $presets[]=array('Token'=>$preset['@attributes']['token'],
  1977. // 'Name'=>$preset['Name'],
  1978. // 'PTZPosition'=>$preset['PTZPosition']);
  1979. // }
  1980. // return $presets;
  1981. return true;
  1982. //};
  1983. };
  1984. return false;
  1985. }
  1986. bool pOnvif::ptz_GetNode(CSTR ptzNodeToken)
  1987. {
  1988. if (m_pPTZURI == NULL)
  1989. {
  1990. return false;
  1991. }
  1992. char tBuffer[DEFAULT_BUFFER_SIZE];
  1993. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_GET_PTZ_NODE, xesc(ptzNodeToken).c_str());
  1994. if (_send_request(m_pPTZURI, tBuffer))
  1995. {
  1996. XMLResults tParseResults;
  1997. XMLNode response = XMLNode::parseString(m_pLastResponse, "root", &tParseResults);
  1998. LOG("RCPT:");
  1999. printf("%s\n", m_pLastResponse);
  2000. if (tParseResults.error)
  2001. {
  2002. char tBuf[CTEXT];
  2003. sprintf(tBuf, "XML Parse Error %d at %d:%d", tParseResults.error, tParseResults.nLine, tParseResults.nColumn);
  2004. LOG_ERROR(tBuf);
  2005. }
  2006. else
  2007. {
  2008. // return $response['Envelope']['Body']['GetNodeResponse'];
  2009. };
  2010. };
  2011. return false;
  2012. }
  2013. bool pOnvif::ptz_GotoPreset(CSTR profileToken, CSTR presetToken, float speed_pantilt_x, float speed_pantilt_y, float speed_zoom_x)
  2014. {
  2015. if (m_pPTZURI == NULL)
  2016. {
  2017. return false;
  2018. }
  2019. char tBuffer[DEFAULT_BUFFER_SIZE];
  2020. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_GOTO_PRESET, xesc(profileToken).c_str(), xesc(presetToken).c_str(), speed_pantilt_x, speed_pantilt_y, speed_zoom_x);
  2021. return _send_request(m_pPTZURI, tBuffer, true);
  2022. }
  2023. bool pOnvif::ptz_RemovePreset(CSTR profileToken, CSTR presetToken)
  2024. {
  2025. if (m_pPTZURI == NULL)
  2026. {
  2027. return false;
  2028. }
  2029. char tBuffer[DEFAULT_BUFFER_SIZE];
  2030. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_REMOVE_PRESET, xesc(profileToken).c_str(), xesc(presetToken).c_str());
  2031. return _send_request(m_pPTZURI, tBuffer, true);
  2032. }
  2033. bool pOnvif::ptz_SetPreset(CSTR profileToken, CSTR presetName)
  2034. {
  2035. if (m_pPTZURI == NULL)
  2036. {
  2037. return false;
  2038. }
  2039. char tBuffer[DEFAULT_BUFFER_SIZE];
  2040. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_SET_PRESET, xesc(profileToken).c_str(), xesc(presetName).c_str());
  2041. return _send_request(m_pPTZURI, tBuffer, true);
  2042. }
  2043. bool pOnvif::ptz_RelativeMove(CSTR profileToken, float translation_pantilt_x, float translation_pantilt_y, float speed_pantilt_x, float speed_pantilt_y)
  2044. {
  2045. if (m_pPTZURI == NULL)
  2046. {
  2047. return false;
  2048. }
  2049. char tBuffer[DEFAULT_BUFFER_SIZE];
  2050. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_RELATIVE_MOVE, xesc(profileToken).c_str(), translation_pantilt_x, translation_pantilt_y, speed_pantilt_x, speed_pantilt_y);
  2051. return _send_request(m_pPTZURI, tBuffer, true);
  2052. }
  2053. bool pOnvif::ptz_RelativeMoveZoom(CSTR profileToken, float zoom, float speedZoom)
  2054. {
  2055. if (m_pPTZURI == NULL)
  2056. {
  2057. return false;
  2058. }
  2059. char tBuffer[DEFAULT_BUFFER_SIZE];
  2060. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_RELATIVE_ZOOM, xesc(profileToken).c_str(), zoom, speedZoom);
  2061. return _send_request(m_pPTZURI, tBuffer, true);
  2062. }
  2063. bool pOnvif::ptz_AbsoluteMove(CSTR profileToken, float position_pantilt_x, float position_pantilt_y, float zoom)
  2064. {
  2065. if (m_pPTZURI == NULL)
  2066. {
  2067. return false;
  2068. }
  2069. char tBuffer[DEFAULT_BUFFER_SIZE];
  2070. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_ABSOLUTE_MOVE, xesc(profileToken).c_str(), position_pantilt_x, position_pantilt_y, zoom);
  2071. // Wait for the answer so that a SOAP Fault (e.g. position out of range) is detected
  2072. return _send_request(m_pPTZURI, tBuffer, true);
  2073. }
  2074. bool pOnvif::ptz_ContinuousMove(CSTR profileToken, float velocity_pantilt_x, float velocity_pantilt_y)
  2075. {
  2076. return ptz_ContinuousMoveAll(profileToken, true, velocity_pantilt_x, velocity_pantilt_y, false, 0.0f);
  2077. }
  2078. bool pOnvif::ptz_ContinuousMoveZoom(CSTR profileToken, float zoom)
  2079. {
  2080. return ptz_ContinuousMoveAll(profileToken, false, 0.0f, 0.0f, true, zoom);
  2081. }
  2082. /*
  2083. One ContinuousMove for all requested axes. Sending pan/tilt and zoom as two requests is not safe: the
  2084. spec does not say that a second ContinuousMove keeps the motion of the axis it leaves out.
  2085. The Timeout makes the camera stop by itself if the Stop request is lost.
  2086. */
  2087. bool pOnvif::ptz_ContinuousMoveAll(CSTR profileToken, bool hasPanTilt, float velocity_pantilt_x, float velocity_pantilt_y, bool hasZoom, float velocity_zoom,
  2088. int timeoutSec)
  2089. {
  2090. if (m_pPTZURI == NULL)
  2091. {
  2092. return false;
  2093. }
  2094. if (! hasPanTilt && ! hasZoom)
  2095. {
  2096. return true;
  2097. }
  2098. char tBody[1024];
  2099. int tLen = snprintf(tBody, sizeof(tBody), PONVIF_BODY_CONTINUOUS_MOVE_BEGIN, xesc(profileToken).c_str());
  2100. if (hasPanTilt && tLen > 0 && tLen < (int) sizeof(tBody))
  2101. {
  2102. tLen += snprintf(tBody + tLen, sizeof(tBody) - tLen, PONVIF_BODY_CONTINUOUS_MOVE_PT, velocity_pantilt_x, velocity_pantilt_y);
  2103. }
  2104. if (hasZoom && tLen > 0 && tLen < (int) sizeof(tBody))
  2105. {
  2106. tLen += snprintf(tBody + tLen, sizeof(tBody) - tLen, PONVIF_BODY_CONTINUOUS_MOVE_ZOOM, velocity_zoom);
  2107. }
  2108. if (tLen > 0 && tLen < (int) sizeof(tBody))
  2109. {
  2110. tLen += snprintf(tBody + tLen, sizeof(tBody) - tLen, PONVIF_BODY_CONTINUOUS_MOVE_END, (timeoutSec > 0) ? timeoutSec : PONVIF_CONTINUOUS_MOVE_TIMEOUT_S);
  2111. }
  2112. if (tLen <= 0 || tLen >= (int) sizeof(tBody))
  2113. {
  2114. LOG_ERROR("ContinuousMove request too long!");
  2115. return false;
  2116. }
  2117. char tBuffer[DEFAULT_BUFFER_SIZE];
  2118. if (! _buildRequest(tBuffer, sizeof(tBuffer), "%s", tBody))
  2119. {
  2120. return false;
  2121. }
  2122. return _send_request(m_pPTZURI, tBuffer, true);
  2123. }
  2124. bool pOnvif::ptz_Stop(CSTR profileToken, bool pantilt, bool zoom)
  2125. {
  2126. if (m_pPTZURI == NULL)
  2127. {
  2128. return false;
  2129. }
  2130. char tBuffer[DEFAULT_BUFFER_SIZE];
  2131. _buildRequest(tBuffer, sizeof(tBuffer), PONVIF_BODY_PTZ_STOP, xesc(profileToken).c_str(), pantilt ? "true" : "false", zoom ? "true" : "false");
  2132. return _send_request(m_pPTZURI, tBuffer, true);
  2133. }
  2134. /*
  2135. Internal functions
  2136. */
  2137. accessToken pOnvif::_makeToken(void)
  2138. {
  2139. time_t tTS = time(NULL) - m_nDeltaTime;
  2140. return _passwordDigest(m_pUsername, m_pPassword, tTS);
  2141. }
  2142. void pOnvif::_getOnvifVersion(nodeCapability & caps)
  2143. {
  2144. if (caps.Device != NULL)
  2145. {
  2146. if (caps.Device->System != NULL)
  2147. {
  2148. if (caps.Device->System->SupportedVersions != NULL)
  2149. {
  2150. m_sOnvifVersion.Major = caps.Device->System->SupportedVersions->Major;
  2151. m_sOnvifVersion.Minor = caps.Device->System->SupportedVersions->Minor;
  2152. };
  2153. };
  2154. };
  2155. // Only use service addresses the device actually reported
  2156. if (caps.PTZ != NULL && caps.PTZ->XAddr[0] != (char) 0)
  2157. {
  2158. m_pPTZURI = caps.PTZ->XAddr;
  2159. };
  2160. if (caps.Media != NULL && caps.Media->XAddr[0] != (char) 0)
  2161. {
  2162. m_pMediaURI = caps.Media->XAddr;
  2163. };
  2164. if (caps.Device != NULL && caps.Device->XAddr[0] != (char) 0)
  2165. {
  2166. m_pDeviceURI = caps.Device->XAddr;
  2167. };
  2168. }
  2169. /*
  2170. protected function _getActiveSources($videoSources,$profiles) {
  2171. $sources=array();
  2172. if (isset($videoSources['@attributes'])) {
  2173. // NVT is a camera
  2174. $sources[0]['sourcetoken']=$videoSources['@attributes']['token'];
  2175. $this->_getProfileData($sources,0,$profiles);
  2176. }
  2177. else {
  2178. // NVT is an encoder
  2179. for ($i=0;$i<count($videoSources);$i++) {
  2180. if (strtolower($videoSources[$i]['@attributes']['SignalActive'])=='true') {
  2181. $sources[$i]['sourcetoken']=$videoSources[$i]['@attributes']['token'];
  2182. $this->_getProfileData($sources,$i,$profiles);
  2183. }
  2184. } // for
  2185. }
  2186. return $sources;
  2187. }
  2188. void pOnvif::_getProfileData( sources,$i, XMLNode profiles ){
  2189. //$inprofile=0;
  2190. videoSourceProfile *tPtr;
  2191. for( $y=0; $y < count($profiles); $y++ ){
  2192. if ($profiles[$y]['VideoSourceConfiguration']['SourceToken']==$sources[$i]['sourcetoken']) {
  2193. $sources[$i][$inprofile]['profilename']=$profiles[$y]['Name'];
  2194. $sources[$i][$inprofile]['profiletoken']=$profiles[$y]['@attributes']['token'];
  2195. if ( isset($profiles[$y]['VideoEncoderConfiguration'])) {
  2196. $sources[$i][$inprofile]['encoding']=$profiles[$y]['VideoEncoderConfiguration']['Encoding'];
  2197. $sources[$i][$inprofile]['width']=$profiles[$y]['VideoEncoderConfiguration']['Resolution']['Width'];
  2198. $sources[$i][$inprofile]['height']=$profiles[$y]['VideoEncoderConfiguration']['Resolution']['Height'];
  2199. $sources[$i][$inprofile]['fps']=$profiles[$y]['VideoEncoderConfiguration']['RateControl']['FrameRateLimit'];
  2200. $sources[$i][$inprofile]['bitrate']=$profiles[$y]['VideoEncoderConfiguration']['RateControl']['BitrateLimit'];
  2201. }
  2202. if ( isset($profiles[$y]['PTZConfiguration'])) {
  2203. $sources[$i][$inprofile]['ptz']['name']=$profiles[$y]['PTZConfiguration']['Name'];
  2204. $sources[$i][$inprofile]['ptz']['nodetoken']=$profiles[$y]['PTZConfiguration']['NodeToken'];
  2205. }
  2206. $inprofile++;
  2207. }
  2208. }
  2209. };
  2210. */
  2211. /*
  2212. protected function _xml2array($response) {
  2213. $sxe = new SimpleXMLElement($response);
  2214. $dom_sxe = dom_import_simplexml($sxe);
  2215. $dom = new DOMDocument('1.0');
  2216. $dom_sxe = $dom->importNode($dom_sxe, true);
  2217. $dom_sxe = $dom->appendChild($dom_sxe);
  2218. $element = $dom->childNodes->item(0);
  2219. foreach ($sxe->getDocNamespaces() as $name => $uri) {
  2220. $element->removeAttributeNS($uri, $name);
  2221. }
  2222. $xmldata=$dom->saveXML();
  2223. $xmldata=substr($xmldata,strpos($xmldata,"<Envelope>"));
  2224. $xmldata=substr($xmldata,0,strpos($xmldata,"</Envelope>")+strlen("</Envelope>"));
  2225. $xml=simplexml_load_string($xmldata);
  2226. $data=json_decode(json_encode((array)$xml),1);
  2227. $data=array($xml->getName()=>$data);
  2228. return $data;
  2229. }
  2230. */
  2231. /*
  2232. WS-Security UsernameToken (OASIS UsernameToken Profile 1.0, PasswordDigest):
  2233. Digest = Base64( SHA1( nonce_bytes + Created + password ) )
  2234. The nonce is PONVIF_NONCE_LEN random bytes (OpenSSL RAND_bytes): a short or repeating nonce can be
  2235. rejected by devices that keep a nonce cache against replays.
  2236. */
  2237. accessToken pOnvif::_passwordDigest(CSTR username, CSTR password, time_t timestamp)
  2238. {
  2239. accessToken RetVal;
  2240. memset(&RetVal, 0, sizeof(RetVal));
  2241. if (timestamp == 0)
  2242. {
  2243. timestamp = time(NULL);
  2244. }
  2245. struct tm tTM;
  2246. if (gmtime_r(&timestamp, &tTM) == NULL || strftime(RetVal.TIMESTAMP, sizeof(RetVal.TIMESTAMP), "%Y-%m-%dT%H:%M:%SZ", &tTM) == 0)
  2247. {
  2248. LOG_ERROR("Cannot format the WS-Security timestamp!");
  2249. RetVal.TIMESTAMP[0] = (char) 0;
  2250. };
  2251. unsigned char tNonce[PONVIF_NONCE_LEN];
  2252. if (RAND_bytes(tNonce, sizeof(tNonce)) != 1)
  2253. {
  2254. // Should not happen; keep going with a weaker nonce rather than not authenticating at all
  2255. for (size_t i = 0; i < sizeof(tNonce); i++)
  2256. {
  2257. tNonce[i] = (unsigned char) (rand() & 0xFF);
  2258. }
  2259. };
  2260. const char * tPass = (password != NULL) ? password : "";
  2261. size_t tTSLen = strlen(RetVal.TIMESTAMP);
  2262. size_t tPWLen = strlen(tPass);
  2263. size_t tLen = sizeof(tNonce) + tTSLen + tPWLen;
  2264. unsigned char * tBuff = (unsigned char *) malloc(tLen);
  2265. if (tBuff == NULL)
  2266. {
  2267. LOG_ERROR("Memory Allocation Error!");
  2268. return RetVal;
  2269. }
  2270. memcpy(tBuff, tNonce, sizeof(tNonce));
  2271. memcpy(tBuff + sizeof(tNonce), RetVal.TIMESTAMP, tTSLen);
  2272. memcpy(tBuff + sizeof(tNonce) + tTSLen, tPass, tPWLen);
  2273. unsigned char tSHA[SHA_DIGEST_LENGTH];
  2274. SHA1(tBuff, tLen, tSHA);
  2275. memset(tBuff, 0, tLen); // contains the password
  2276. free(tBuff);
  2277. size_t baseOutLen = 0;
  2278. unsigned char * tB64 = base64_encode(tSHA, SHA_DIGEST_LENGTH, &baseOutLen);
  2279. if (tB64)
  2280. {
  2281. snprintf(RetVal.PASSDIGEST, sizeof(RetVal.PASSDIGEST), "%.*s", (int) baseOutLen, (const char *) tB64);
  2282. free(tB64);
  2283. }
  2284. tB64 = base64_encode(tNonce, sizeof(tNonce), &baseOutLen);
  2285. if (tB64)
  2286. {
  2287. snprintf(RetVal.NONCE, sizeof(RetVal.NONCE), "%.*s", (int) baseOutLen, (const char *) tB64);
  2288. free(tB64);
  2289. }
  2290. // The user name goes into the XML header: escape it
  2291. _xmlEscape((username != NULL) ? username : "", RetVal.USERNAME, sizeof(RetVal.USERNAME));
  2292. return RetVal;
  2293. }
  2294. bool pOnvif::_hasCredentials(void)
  2295. {
  2296. return (m_pUsername != NULL && m_pUsername[0] != (char) 0);
  2297. }
  2298. char * pOnvif::_xmlEscape(const char * src, char * dst, size_t dstSize)
  2299. {
  2300. if (dst == NULL || dstSize == 0)
  2301. {
  2302. return dst;
  2303. }
  2304. size_t o = 0;
  2305. for (const char * c = (src != NULL) ? src : ""; *c; c++)
  2306. {
  2307. const char * rep = NULL;
  2308. switch (*c)
  2309. {
  2310. case '&' : rep = "&amp;"; break;
  2311. case '<' : rep = "&lt;"; break;
  2312. case '>' : rep = "&gt;"; break;
  2313. case '"' : rep = "&quot;"; break;
  2314. case '\'': rep = "&apos;"; break;
  2315. default : break;
  2316. };
  2317. size_t l = (rep != NULL) ? strlen(rep) : 1;
  2318. if (o + l >= dstSize)
  2319. {
  2320. break; // truncate, never split an entity
  2321. }
  2322. if (rep != NULL)
  2323. {
  2324. memcpy(dst + o, rep, l);
  2325. }
  2326. else
  2327. {
  2328. dst[o] = *c;
  2329. }
  2330. o += l;
  2331. };
  2332. dst[o] = (char) 0;
  2333. return dst;
  2334. }
  2335. /*
  2336. SOAP 1.2 envelope + WS-Security UsernameToken header (only when a user name is set: ONVIF allows
  2337. anonymous access, and an empty token would be rejected) + body.
  2338. */
  2339. bool pOnvif::_buildRequest(char * out, size_t outSize, const char * bodyFmt, ...)
  2340. {
  2341. if (out == NULL || outSize == 0)
  2342. {
  2343. return false;
  2344. }
  2345. out[0] = (char) 0;
  2346. int tLen = snprintf(out, outSize, "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><s:Envelope xmlns:s=\"http://www.w3.org/2003/05/soap-envelope\">");
  2347. if (_hasCredentials() && tLen > 0 && tLen < (int) outSize)
  2348. {
  2349. accessToken tTOKEN = _makeToken();
  2350. tLen += snprintf(out + tLen, outSize - tLen, PONVIF_HEADER_SECUR, tTOKEN.USERNAME, tTOKEN.PASSDIGEST, tTOKEN.NONCE, tTOKEN.TIMESTAMP);
  2351. }
  2352. if (tLen > 0 && tLen < (int) outSize)
  2353. {
  2354. tLen += snprintf(out + tLen, outSize - tLen, "<s:Body xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">");
  2355. }
  2356. if (tLen > 0 && tLen < (int) outSize)
  2357. {
  2358. va_list ap;
  2359. va_start(ap, bodyFmt);
  2360. tLen += vsnprintf(out + tLen, outSize - tLen, bodyFmt, ap);
  2361. va_end(ap);
  2362. }
  2363. if (tLen > 0 && tLen < (int) outSize)
  2364. {
  2365. tLen += snprintf(out + tLen, outSize - tLen, "</s:Body></s:Envelope>");
  2366. }
  2367. if (tLen <= 0 || tLen >= (int) outSize)
  2368. {
  2369. LOG_ERROR("Request does not fit into the buffer!");
  2370. out[0] = (char) 0;
  2371. return false;
  2372. }
  2373. return true;
  2374. }
  2375. /*
  2376. A reply was received: check HTTP status and SOAP Fault. Devices answer a failed operation with a
  2377. SOAP Fault (normally HTTP 400/500), e.g. ter:NotAuthorized, ter:InvalidArgVal, ter:NoProfile.
  2378. */
  2379. bool pOnvif::_checkReply(void)
  2380. {
  2381. m_cLastFault[0] = (char) 0;
  2382. long tHttp = m_nLastHttpCode;
  2383. if (m_pLastResponse != NULL && strstr(m_pLastResponse, "Fault") != NULL)
  2384. {
  2385. XMLResults tParseResults;
  2386. XMLNode response = XMLNode::parseString(m_pLastResponse, "root", &tParseResults);
  2387. XMLNode tFault = response.getChildNode("Body", 0).getChildNode("Fault", 0);
  2388. if (! tFault.isEmpty())
  2389. {
  2390. XMLNode tCode = tFault.getChildNode("Code", 0);
  2391. const char * tValue = tCode.getChildNode("Value", 0).getText(0);
  2392. const char * tSubcode = tCode.getChildNode("Subcode", 0).getChildNode("Value", 0).getText(0);
  2393. const char * tSubSub = tCode.getChildNode("Subcode", 0).getChildNode("Subcode", 0).getChildNode("Value", 0).getText(0);
  2394. const char * tReason = tFault.getChildNode("Reason", 0).getChildNode("Text", 0).getText(0);
  2395. snprintf(m_cLastFault, sizeof(m_cLastFault), "%s%s%s%s%s: %s", tValue ? tValue : "?", tSubcode ? " / " : "", tSubcode ? tSubcode : "", tSubSub ? " / " : "",
  2396. tSubSub ? tSubSub : "", tReason ? tReason : "");
  2397. m_eLastError = PONVIF_ERR_FAULT;
  2398. char tB[CTEXT + 64];
  2399. snprintf(tB, sizeof(tB), "SOAP Fault [HTTP %ld] %s", tHttp, m_cLastFault);
  2400. LOG_ERROR(tB);
  2401. return false;
  2402. };
  2403. };
  2404. if (tHttp != 200 && tHttp != 0)
  2405. {
  2406. m_eLastError = PONVIF_ERR_HTTP;
  2407. snprintf(m_cLastFault, sizeof(m_cLastFault), "HTTP %ld", tHttp);
  2408. char tB[64];
  2409. snprintf(tB, sizeof(tB), "HTTP error %ld", tHttp);
  2410. LOG_ERROR(tB);
  2411. return false;
  2412. };
  2413. m_eLastError = PONVIF_OK;
  2414. return true;
  2415. }
  2416. onvifError pOnvif::getLastError(void)
  2417. {
  2418. return m_eLastError;
  2419. }
  2420. CSTR pOnvif::getLastFault(void)
  2421. {
  2422. return m_cLastFault;
  2423. }
  2424. videoSourceProfile * pOnvif::getPTZProfile(void)
  2425. {
  2426. for (videoSourceProfiles::iterator idx = m_vVideoProfiles.begin(); idx != m_vVideoProfiles.end(); idx++)
  2427. {
  2428. if ((*idx)->ptz)
  2429. {
  2430. return *idx;
  2431. }
  2432. };
  2433. return NULL;
  2434. }
  2435. void * pOnvif::parser(void * obj, void * ptr)
  2436. {
  2437. pOnvif * ME = (pOnvif *) obj;
  2438. curlRequest * RQ = (curlRequest *) ptr;
  2439. if (ME)
  2440. {
  2441. ME->m_mParserLock.lock();
  2442. if (RQ != ME->m_pPendingRequest)
  2443. {
  2444. // Late reply to a request that already timed out: ignore it, so it cannot be
  2445. // taken as the answer to the request that is waiting now.
  2446. ME->m_mParserLock.unlock();
  2447. return NULL;
  2448. };
  2449. long tHttp = 0;
  2450. if (RQ->getEH() != NULL)
  2451. {
  2452. curl_easy_getinfo(RQ->getEH(), CURLINFO_RESPONSE_CODE, &tHttp);
  2453. }
  2454. ME->m_nLastHttpCode = tHttp;
  2455. if (ME->m_pLastResponse)
  2456. {
  2457. free(ME->m_pLastResponse);
  2458. }
  2459. ME->m_pLastResponse = (CSTR) malloc(RQ->getSize() + 1);
  2460. if (ME->m_pLastResponse)
  2461. {
  2462. memcpy(ME->m_pLastResponse, RQ->getBuffer(), RQ->getSize());
  2463. ME->m_pLastResponse[RQ->getSize()] = (char) 0;
  2464. #ifdef DEBUG_ONVIF_TRAFFIC
  2465. FILE * tf;
  2466. tf = fopen("Traffic.txt", "a+");
  2467. fprintf(tf, "~~~~~~~~~~~~~~~~~~~~\r\n");
  2468. fprintf(tf, "<<<<< [%d] %s\n", RQ->getSize(), ME->m_pLastResponse);
  2469. fprintf(tf, "~~~~~~~~~~~~~~~~~~~~\r\n");
  2470. fclose(tf);
  2471. #endif
  2472. };
  2473. ME->parser_done = true;
  2474. ME->m_mParserLock.unlock();
  2475. };
  2476. return NULL;
  2477. }
  2478. bool pOnvif::_send_request(CSTR url, CSTR post_string, bool mustReturnData)
  2479. {
  2480. #ifdef CURL_MANAGER
  2481. bool RetVal = false;
  2482. m_eLastError = PONVIF_ERR_COMM;
  2483. if (url == NULL || url[0] == (char) 0 || post_string == NULL)
  2484. {
  2485. LOG_ERROR("No service URL!");
  2486. return false;
  2487. }
  2488. if (m_pHttpAccessManager)
  2489. {
  2490. m_mResponseProtector.lock();
  2491. curlRequest * tRC;
  2492. tRC = new curlRequest(url, (CSTR) "application/soap+xml; charset=utf-8");
  2493. if (tRC != NULL)
  2494. {
  2495. #ifdef DEBUG_ONVIF_TRAFFIC
  2496. FILE * tf;
  2497. tf = fopen("Traffic.txt", "a+");
  2498. fprintf(tf, "--------------------\r\n");
  2499. fprintf(tf, "REQ: %s (%d)\n", url, strlen(post_string));
  2500. fprintf(tf, ">>>>> %s\n", post_string);
  2501. fprintf(tf, "--------------------\r\n");
  2502. fclose(tf);
  2503. mustReturnData = true; // In Debug Allways Read Return
  2504. #endif
  2505. // HTTP authentication only if credentials are set (anonymous devices are allowed by ONVIF).
  2506. // Mode 0 (default): CURLAUTH_ANY - the request is sent without credentials first and curl answers
  2507. // the challenge the device sends (Digest preferred, Basic only if the device asks for it),
  2508. // so the password is never sent in clear unless the device requires Basic.
  2509. if (_hasCredentials() && m_pPassword != NULL && m_pPassword[0] != (char) 0)
  2510. {
  2511. tRC->setCredentials(m_pUsername, m_pPassword, (m_bAuthMode == 0) ? 7 : m_bAuthMode);
  2512. }
  2513. tRC->setPOST(post_string, strlen(post_string));
  2514. if (mustReturnData)
  2515. {
  2516. tRC->setHandler((void *) this, pOnvif::parser, (void *) tRC);
  2517. // Arm before the request is queued: the reply can arrive before accomplish() returns.
  2518. m_mParserLock.lock();
  2519. parser_done = false;
  2520. m_pPendingRequest = (void *) tRC;
  2521. m_mParserLock.unlock();
  2522. if (m_pHttpAccessManager->accomplish(tRC))
  2523. {
  2524. uint8_t cnt = 200; // TO = 2 second
  2525. while (! RetVal && cnt--)
  2526. {
  2527. m_mParserLock.lock();
  2528. RetVal = parser_done;
  2529. m_mParserLock.unlock();
  2530. if (! RetVal)
  2531. {
  2532. SLEEP(10);
  2533. }
  2534. };
  2535. };
  2536. // From here on any reply to tRC is stale (tRC may already be deleted by the manager)
  2537. m_mParserLock.lock();
  2538. m_pPendingRequest = NULL;
  2539. m_mParserLock.unlock();
  2540. if (RetVal)
  2541. {
  2542. RetVal = _checkReply();
  2543. }
  2544. else
  2545. {
  2546. m_eLastError = PONVIF_ERR_COMM;
  2547. };
  2548. }
  2549. else
  2550. {
  2551. RetVal = m_pHttpAccessManager->accomplish(tRC);
  2552. };
  2553. }
  2554. else
  2555. {
  2556. LOG_ERROR("Cannot Create curlRequest!");
  2557. }
  2558. m_mResponseProtector.unlock();
  2559. };
  2560. return RetVal;
  2561. #else
  2562. char tBuffer[CTEXT];
  2563. if (m_pCURL == NULL)
  2564. {
  2565. if (m_pLastResponse == NULL)
  2566. {
  2567. m_pLastResponse = (CSTR) malloc(DEFAULT_BUFFER_SIZE);
  2568. };
  2569. m_pCURL = curl_easy_init();
  2570. if (m_pProxyHost != NULL && m_nProxyPort != 0)
  2571. {
  2572. curl_easy_setopt(m_pCURL, CURLOPT_PROXY, m_pProxyHost);
  2573. curl_easy_setopt(m_pCURL, CURLOPT_PROXYPORT, m_nProxyPort);
  2574. if (m_pProxyUsername != NULL && m_pProxyPassword != NULL)
  2575. {
  2576. sprintf(tBuffer, "%s:%s", m_pProxyUsername, m_pProxyPassword);
  2577. curl_easy_setopt(m_pCURL, CURLOPT_PROXYUSERPWD, tBuffer);
  2578. };
  2579. };
  2580. curl_easy_setopt(m_pCURL, CURLOPT_CONNECTTIMEOUT, 1);
  2581. curl_easy_setopt(m_pCURL, CURLOPT_TIMEOUT, 2);
  2582. curl_easy_setopt(m_pCURL, CURLOPT_SSL_VERIFYPEER, 0);
  2583. curl_easy_setopt(m_pCURL, CURLOPT_SSL_VERIFYHOST, 0);
  2584. curl_easy_setopt(m_pCURL, CURLOPT_VERBOSE, 0);
  2585. curl_easy_setopt(m_pCURL, CURLOPT_POST, 1);
  2586. // curl_easy_setopt( m_pCURL, CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS, 0 );
  2587. // curl_easy_setopt( m_pCURL, CURLOPT_NOPROGRESS, 1 );
  2588. // curl_easy_setopt( m_pCURL, CURLOPT_NOSIGNAL, 1 );
  2589. curl_easy_setopt(m_pCURL, CURLOPT_TCP_FASTOPEN, 1);
  2590. curl_easy_setopt(m_pCURL, CURLOPT_TCP_NODELAY, 1);
  2591. // curl_easy_setopt( m_pCURL, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
  2592. curl_easy_setopt(m_pCURL, CURLOPT_WRITEFUNCTION, pOnvif::_writer);
  2593. curl_easy_setopt(m_pCURL, CURLOPT_WRITEDATA, this);
  2594. };
  2595. if (m_pCURL != NULL)
  2596. {
  2597. curl_easy_setopt(m_pCURL, CURLOPT_URL, url);
  2598. struct curl_slist * sList = NULL;
  2599. // Content-Type: application/soap+xml; charset=utf-8; action="http://www.onvif.org/ver20/ptz/wsdl/ContinuousMove"
  2600. // Connection: Close
  2601. sList = curl_slist_append(sList, "Content-Type: text/xml; charset=utf-8");
  2602. sprintf(tBuffer, "Content-Length: %d", strlen(post_string));
  2603. sList = curl_slist_append(sList, tBuffer);
  2604. curl_easy_setopt(m_pCURL, CURLOPT_HTTPHEADER, sList);
  2605. curl_easy_setopt(m_pCURL, CURLOPT_POSTFIELDS, post_string);
  2606. sprintf(tBuffer, "%s:%s", m_pUsername, m_pPassword);
  2607. curl_easy_setopt(m_pCURL, CURLOPT_USERPWD, tBuffer);
  2608. switch (m_bAuthMode)
  2609. {
  2610. case 0: curl_easy_setopt(m_pCURL, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); break;
  2611. case 1: curl_easy_setopt(m_pCURL, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); break;
  2612. case 2: curl_easy_setopt(m_pCURL, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST_IE); break;
  2613. case 3: curl_easy_setopt(m_pCURL, CURLOPT_HTTPAUTH, CURLAUTH_BEARER); break;
  2614. case 4: curl_easy_setopt(m_pCURL, CURLOPT_HTTPAUTH, CURLAUTH_NEGOTIATE); break;
  2615. case 5: curl_easy_setopt(m_pCURL, CURLOPT_HTTPAUTH, CURLAUTH_NTLM); break;
  2616. case 6: curl_easy_setopt(m_pCURL, CURLOPT_HTTPAUTH, CURLAUTH_NTLM_WB); break;
  2617. case 7: curl_easy_setopt(m_pCURL, CURLOPT_HTTPAUTH, CURLAUTH_ANY); break;
  2618. case 8: curl_easy_setopt(m_pCURL, CURLOPT_HTTPAUTH, CURLAUTH_ANYSAFE); break;
  2619. case 9:
  2620. curl_easy_setopt(m_pCURL, CURLOPT_HTTPAUTH, CURLAUTH_ONLY);
  2621. break;
  2622. // case 10: curl_easy_setopt( m_pCURL, CURLOPT_HTTPAUTH, CURLAUTH_AWS_SIGV4 ); break;
  2623. };
  2624. #ifdef DEBUG
  2625. char tErrorBuffer[CURL_ERROR_SIZE];
  2626. curl_easy_setopt(m_pCURL, CURLOPT_ERRORBUFFER, tErrorBuffer);
  2627. #endif
  2628. m_pLastIndex = 0;
  2629. if (curl_easy_perform(m_pCURL))
  2630. {
  2631. LOG_ERROR("CURL Failure!");
  2632. #ifdef DEBUG
  2633. LOG_ERROR(tErrorBuffer);
  2634. #endif
  2635. }
  2636. else
  2637. {
  2638. m_pLastResponse[m_pLastIndex] = (char) 0;
  2639. return true;
  2640. };
  2641. m_pLastIndex = 0;
  2642. };
  2643. return false;
  2644. #endif
  2645. }
  2646. #ifndef CURL_MANAGER
  2647. int pOnvif::_writer(char * data, size_t size, size_t nmemb, pOnvif * Ptr)
  2648. {
  2649. if (Ptr == NULL)
  2650. {
  2651. return 0;
  2652. }
  2653. // TLOG("*");
  2654. memcpy(Ptr->m_pLastResponse + Ptr->m_pLastIndex, data, size * nmemb);
  2655. Ptr->m_pLastIndex += size * nmemb;
  2656. return size * nmemb;
  2657. }
  2658. #endif
  2659. bool pOnvif::setAuthMode(uint8_t Mode)
  2660. {
  2661. m_bAuthMode = Mode;
  2662. #ifdef DEBUG
  2663. switch (m_bAuthMode)
  2664. {
  2665. case 0 : LOG("Set Auth default (CURLAUTH_ANY: answer the device's challenge)"); break;
  2666. case 1 : LOG("Set Auth CURLAUTH_DIGEST"); break;
  2667. case 2 : LOG("Set Auth CURLAUTH_DIGEST_IE"); break;
  2668. case 3 : LOG("Set Auth CURLAUTH_BEARER"); break;
  2669. case 4 : LOG("Set Auth CURLAUTH_NEGOTIATE"); break;
  2670. case 5 : LOG("Set Auth CURLAUTH_NTLM"); break;
  2671. case 6 : LOG("Set Auth CURLAUTH_NTLM_WB"); break;
  2672. case 7 : LOG("Set Auth CURLAUTH_ANY"); break;
  2673. case 8 : LOG("Set Auth CURLAUTH_ANYSAFE"); break;
  2674. case 9 : LOG("Set Auth CURLAUTH_ONLY"); break;
  2675. case 10: LOG("Set Auth CURLAUTH_AWS_SIGV4"); break;
  2676. };
  2677. #endif
  2678. return true;
  2679. }
  2680. #undef LOG
  2681. #undef TLOG
  2682. #undef LOG_ERROR