when a printer port is added port name and port uri are being handed over to "add port command" like this:
when "enumports command" just lists the above string then this *whole* string is being listed as port name to EnumPorts RPC calls. As a result instead of "IP_18.104.22.168" windows clients show "IP_22.214.171.124 socket://126.96.36.199:9100/" as printer port.
On the other hand it's not possible to just output the port name "IP_188.8.131.52" via "enumports command" because Samba then never gets the port uri again.
At the moment the only possible way to use the add/enum port commands in conjunction with printers is to let "enumport command" just output the port uri which is however contrary to what Windows does and the port name is drawn useless then.
This is probably fixed with a newer Samba version. If you still see the error. Please open a new bug with 'debug level = 10' logfiles of the new Samba version 3.5 or 3.6. Thanks!