MCPcopy Create free account
hub / github.com/MapServer/MapServer / msOWSNegotiateVersion

Function msOWSNegotiateVersion

mapows.c:629–647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627*/
628
629int msOWSNegotiateVersion(int requested_version, int supported_versions[], int num_supported_versions) {
630 int i;
631
632 /* if version is not set return highest version */
633 if (! requested_version)
634 return supported_versions[0];
635
636 /* if the requested version is lower than the lowest version return the lowest version */
637 if (requested_version < supported_versions[num_supported_versions-1])
638 return supported_versions[num_supported_versions-1];
639
640 /* return the first entry that's lower than or equal to the requested version */
641 for (i = 0; i < num_supported_versions; i++) {
642 if (supported_versions[i] <= requested_version)
643 return supported_versions[i];
644 }
645
646 return requested_version;
647}
648
649/*
650** msOWSTerminateOnlineResource()

Callers 2

msWCSGetCapabilitiesFunction · 0.85
msWFSGetCapabilitiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected