Skip to content

Conversation

@ChironEvans
Copy link

Both the parsed url and the device management URL have the port stripped regardless of whether the input arg included one.

s.x_addr provided by the device includes a port on Uniview IPC devices, which leads to failed validation.

Both the parsed url and the device management URL have the port stripped regardless of whether the input arg included one.

s.x_addr provided by the device includes a port on Uniview IPC devices, which leads to failed validation.
@ChironEvans
Copy link
Author

I encountered an issue when attempting to connect to one of my IP Cameras made by Uniview.

Result:

thread 'main' panicked at 'called Result::unwrap() on an Err value: "advertised device mgmt uri http://192.168.3.23:80/onvif/device_service not expected http://192.168.3.23/onvif/device_service"', onvif\examples\camera.rs:458:45

What was happening was the unparsed URL was being compared to the Device Management URL
Parsed URL: http://192.168.3.23/onvif/device_service
Raw URL: http://192.168.3.23:80/onvif/device_service
Device Management URL: http://192.168.3.23/onvif/device_service

Because the raw URL contained a port, the application panicked. This occurred whether my uri argument was uri=http://192.168.3.23:80 or uri=http://192.168.3.23.

Behavior after change: Camera example functionality returns device information.

Copy link
Contributor

@DmitrySamoylov DmitrySamoylov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@DmitrySamoylov
Copy link
Contributor

@ChironEvans Can you fix formatting and force-push the branch, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants