Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Altered Clients::new() URL checks to use parsed URL. #101

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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.

None yet

2 participants