commit_ported:bug fixes in glob_midi_setapi in s_midi

Status Job ID Name Coverage
  Test
canceled #11759
i386 jessie debian
debian_jessie_i386_deb

canceled #11760
x86_64 jessie debian
debian_jessie_x86_64_deb

canceled #11761
x86_64 stretch debian
debian_stretch_x86_64_deb

canceled #11765
dmg v10.11 osx
osx_10.11_x86_64_dmg

canceled #11766
dmg v10.8 osx
osx_10.8_x86_64_dmg

canceled #11768
stretch arm raspbian
raspbian_stretch_armv7l_deb

canceled #11762
i386 v14.04 ubuntu
ubuntu_14.04_i386_deb

canceled #11763
x86_64 v14.04 ubuntu
ubuntu_14.04_x86_64_deb

canceled #11764
x86_64 v16.04 ubuntu
ubuntu_16.04_x86_64_deb

canceled #11767
i386 windows
windows_i386_innosetup