From: Volker Lendecke Date: Sun, 30 Nov 2008 11:30:00 +0000 (+0100) Subject: Do not build the session request if it si not used anyway X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba.git;a=commitdiff_plain;h=95873566e3723ce5197b0a7a1689bc9b0b8b9dfd Do not build the session request if it si not used anyway --- diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index b0fdc9920b1..8b7ac7d7184 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1397,6 +1397,10 @@ bool cli_session_request(struct cli_state *cli, char *p; int len = 4; + /* 445 doesn't have session request */ + if (cli->port == 445) + return True; + memcpy(&(cli->calling), calling, sizeof(*calling)); memcpy(&(cli->called ), called , sizeof(*called )); @@ -1410,10 +1414,6 @@ bool cli_session_request(struct cli_state *cli, name_mangle(cli->calling.name, p, cli->calling.name_type); len += name_len(p); - /* 445 doesn't have session request */ - if (cli->port == 445) - return True; - /* send a session request (RFC 1002) */ /* setup the packet length * Remove four bytes from the length count, since the length