{"action":"created","issue":{"url":"https://api.github.com/repos/SIPp/sipp/issues/145","labels_url":"https://api.github.com/repos/SIPp/sipp/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/SIPp/sipp/issues/145/comments","events_url":"https://api.github.com/repos/SIPp/sipp/issues/145/events","html_url":"https://github.com/SIPp/sipp/pull/145","id":82978253,"number":145,"title":"Change pcap search logic so we prefer files found next to the scenario file.","user":{"login":"vodik","id":216803,"avatar_url":"https://avatars.githubusercontent.com/u/216803?v=3","gravatar_id":"","url":"https://api.github.com/users/vodik","html_url":"https://github.com/vodik","followers_url":"https://api.github.com/users/vodik/followers","following_url":"https://api.github.com/users/vodik/following{/other_user}","gists_url":"https://api.github.com/users/vodik/gists{/gist_id}","starred_url":"https://api.github.com/users/vodik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vodik/subscriptions","organizations_url":"https://api.github.com/users/vodik/orgs","repos_url":"https://api.github.com/users/vodik/repos","events_url":"https://api.github.com/users/vodik/events{/privacy}","received_events_url":"https://api.github.com/users/vodik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"wdoekes","id":1225014,"avatar_url":"https://avatars.githubusercontent.com/u/1225014?v=3","gravatar_id":"","url":"https://api.github.com/users/wdoekes","html_url":"https://github.com/wdoekes","followers_url":"https://api.github.com/users/wdoekes/followers","following_url":"https://api.github.com/users/wdoekes/following{/other_user}","gists_url":"https://api.github.com/users/wdoekes/gists{/gist_id}","starred_url":"https://api.github.com/users/wdoekes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wdoekes/subscriptions","organizations_url":"https://api.github.com/users/wdoekes/orgs","repos_url":"https://api.github.com/users/wdoekes/repos","events_url":"https://api.github.com/users/wdoekes/events{/privacy}","received_events_url":"https://api.github.com/users/wdoekes/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-05-31T03:01:32Z","updated_at":"2015-06-16T21:05:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SIPp/sipp/pulls/145","html_url":"https://github.com/SIPp/sipp/pull/145","diff_url":"https://github.com/SIPp/sipp/pull/145.diff","patch_url":"https://github.com/SIPp/sipp/pull/145.patch"},"body":"One of the breaking changes with the Sangoma SIPp fork is that we changed the pcap search logic to prefer looking next to the scenario file. This made organizing a large collection of different sipp scenarios considerably simpler.\r\n\r\nThis is a more thorough patch to the one we have internally, refactoring some other logic as well. I was going to initially prefer checking the current working directory and then, failing finding a pcap there, search next to the scenario. While discussing this change with @wdoekes, he suggested that the current behaviour could actually be considered a bug, which prompted to instead do the reverse, prefer the file next to the scenario instead. This probably makes way more sense and what would be expected anyways.\r\n\r\nSo, assuming we go with this approach, this patch also adds some additional warning messages to help with the migration:\r\n\r\n- Warn if the pcap can't be found next to the scenario that we'll fallback to assuming the file is in the current working directory\r\n- Warn if the pcap happens to be found in both places that now the one next to the scenario will be used.\r\n\r\nCatch: the second warning can have false positives: when we provide a full path to the scenario which also happens to be in the current working directory as well. Either I should check if `scenario_path == getcwd()` or just drop the second warning. I'm not convinced its a common enough occurrence."},"comment":{"url":"https://api.github.com/repos/SIPp/sipp/issues/comments/112569636","html_url":"https://github.com/SIPp/sipp/pull/145#issuecomment-112569636","issue_url":"https://api.github.com/repos/SIPp/sipp/issues/145","id":112569636,"user":{"login":"vodik","id":216803,"avatar_url":"https://avatars.githubusercontent.com/u/216803?v=3","gravatar_id":"","url":"https://api.github.com/users/vodik","html_url":"https://github.com/vodik","followers_url":"https://api.github.com/users/vodik/followers","following_url":"https://api.github.com/users/vodik/following{/other_user}","gists_url":"https://api.github.com/users/vodik/gists{/gist_id}","starred_url":"https://api.github.com/users/vodik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vodik/subscriptions","organizations_url":"https://api.github.com/users/vodik/orgs","repos_url":"https://api.github.com/users/vodik/repos","events_url":"https://api.github.com/users/vodik/events{/privacy}","received_events_url":"https://api.github.com/users/vodik/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T21:05:13Z","updated_at":"2015-06-16T21:05:13Z","body":"I dropped the second warning because of the large possibility of false positives. I bet in most cases people are running there scenarios from the current working directory anyways. I'm going to raise a separate issue for `MAX_PATH` when this lands."}}