Author: metze Date: 2007-02-28 17:25:29 +0000 (Wed, 28 Feb 2007) New Revision: 21593
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21593 Log: give a more useful error, when we can't resolve a long name via broadcast of wins metze Modified: branches/SAMBA_4_0/source/libcli/resolve/nbtlist.c Changeset: Modified: branches/SAMBA_4_0/source/libcli/resolve/nbtlist.c =================================================================== --- branches/SAMBA_4_0/source/libcli/resolve/nbtlist.c 2007-02-28 17:23:35 UTC (rev 21592) +++ branches/SAMBA_4_0/source/libcli/resolve/nbtlist.c 2007-02-28 17:25:29 UTC (rev 21593) @@ -126,6 +126,15 @@ if (composite_nomem(state->name.scope, c)) return c; } + /* + * we can't push long names on the wire, + * so bail out here to give a useful error message + */ + if (strlen(state->name.name) > 15) { + composite_error(c, NT_STATUS_OBJECT_NAME_NOT_FOUND); + return c; + } + state->nbtsock = nbt_name_socket_init(state, event_ctx); if (composite_nomem(state->nbtsock, c)) return c;
