summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-12-01 22:06:53 +0000
committerLuke Leighton <lkcl@samba.org>1999-12-01 22:06:53 +0000
commita76fee73337aca00973ca744f3c41906a72e5855 (patch)
treee95371767e795740b3abb2804a1c87225d43512a /source3/rpcclient
parentc15b95cd1ede75b38d3a2c5192f2d1fd2a310c9a (diff)
downloadsamba-a76fee73337aca00973ca744f3c41906a72e5855.tar.gz
samba-a76fee73337aca00973ca744f3c41906a72e5855.tar.bz2
samba-a76fee73337aca00973ca744f3c41906a72e5855.zip
more cli_session_setup() calls. what the heck are these doing???
they should all be replaced with cli_establish_connection(). created cli_use_wait_keyboard() which waits on multiple cli_states and swallows session keepalives. (This used to be commit fcc39b3f4f2f8d04d3fab09db048b4f3dc1e97d5)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/rpcclient.c45
1 files changed, 1 insertions, 44 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 4dc919fd97..6c9af8815f 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -718,36 +718,6 @@ static BOOL do_command(struct client_info *info, char *line)
return True;
}
-#ifndef HAVE_LIBREADLINE
-/****************************************************************************
-wait for keyboard activity, swallowing network packets
-****************************************************************************/
-static void wait_keyboard(struct cli_state *cli)
-{
- fd_set fds;
- struct timeval timeout;
-
- while (1) {
- FD_ZERO(&fds);
- FD_SET(cli->fd,&fds);
- FD_SET(fileno(stdin),&fds);
-
- timeout.tv_sec = 20;
- timeout.tv_usec = 0;
- sys_select(MAX(cli->fd,fileno(stdin))+1,NULL, &fds,&timeout);
-
- if (FD_ISSET(fileno(stdin),&fds))
- return;
-
- /* We deliberately use receive_smb instead of
- client_receive_smb as we want to receive
- session keepalives and then drop them here.
- */
- if (FD_ISSET(cli->fd,&fds))
- receive_smb(cli->fd,cli->inbuf,0);
- }
-}
-#endif
/****************************************************************************
process commands from the client
@@ -795,26 +765,13 @@ static BOOL process( struct client_info *info, char *cmd_str)
fprintf(out_hnd, "%s$ ", CNV_LANG(cli_info.dest_host));
fflush(out_hnd);
-#ifdef CLIX
- line[0] = wait_keyboard(NULL);
- /* this might not be such a good idea... */
- if ( line[0] == EOF)
- {
- break;
- }
-#else
- wait_keyboard(NULL);
-#endif
+ cli_net_wait_keyboard();
/* and get a response */
-#ifdef CLIX
- fgets( &line[1],999, stdin);
-#else
if (!fgets(line,1000,stdin))
{
break;
}
-#endif
#else /* HAVE_LIBREADLINE */