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.

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