1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 00:08:11 +00:00

Fix stop capture for Docker

Fix #443, #442
This commit is contained in:
Julien Duponchelle 2016-02-24 15:14:01 +01:00
parent 5f15667ad1
commit fd18458588
No known key found for this signature in database
GPG Key ID: F1E2485547D4595D

View File

@ -300,7 +300,6 @@ class DockerHandler:
docker_manager = Docker.instance()
vm = docker_manager.get_vm(request.match_info["vm_id"], project_id=request.match_info["project_id"])
adapter_number = int(request.match_info["adapter_number"])
port_number = int(request.match_info["port_number"])
pcap_file_path = os.path.join(vm.project.capture_working_directory(), request.json["capture_file_name"])
if not vm.is_running():
@ -332,6 +331,5 @@ class DockerHandler:
raise HTTPConflict(text="Cannot capture traffic on a non started VM")
adapter_number = int(request.match_info["adapter_number"])
port_number = int(request.match_info["port_number"])
yield from vm.stop_capture(adapter_number, port_number)
yield from vm.stop_capture(adapter_number)
response.set_status(204)