when a printer port is added port name and port uri are being handed over to "add port command" like this: IP_2.3.4.5 socket://2.3.4.5:9100/ 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_2.3.4.5" windows clients show "IP_2.3.4.5 socket://2.3.4.5:9100/" as printer port. On the other hand it's not possible to just output the port name "IP_2.3.4.5" 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!