DataReady not returning enough (General questions)
I am running into a problem at a single customer using the SSH ActiveX component. We are successfully connecting via uid/privkey and sending a shell script to ESX 4.0, but DataReady is not returning enough to continue.
I've tried to explain the problem in pseudo-code. As you can see we are not continuing until DataReady is more than our command length. So, because DataReady only returns 17 it loops endlessly.
Please advise.
sCommand = if [ -e /etc/vmware-release ]; then RELFILE=/etc/vmware-release; OSVER=`sed -e 's/[^[:digit:]]*//' -e 's/[ ]*(.*//' $RELFILE`; OSNAME=`sed -e 's/[ ]*[[:digit:]].*//' $RELFILE`;elif [ -e /proc/vmware/version ]; then RELFILE=/proc/vmware/version; OSVER=`sed -n '1p' $RELFILE | sed -e 's/.*Server[ ]*//' -e 's/[ ]*[.*//'`; OSNAME=`sed -n -e '1s/[ ]*[[:digit:]].*//p' $RELFILE`;else OSVER= Unknown ; OSNAME= Unknown ;fi;echo -n $OSNAME $OSVER ; echo -e 0000
ISSH.Send(sCommand)
eState = Sending
do
{
eState = ISSH.State(sCommand)
Sleep(1000)
}
while(eState == Sending)
// State == Connected
lDataReady = 0
do
{
lDataReady = ISSH.DataReady()
// first call returns 0
// second call returns 17
if(0 == lDataReady || lDataReady < sCommand.length())
lDataReady = 0
}
while(lDataReady == 0)
...
Complete thread:
- DataReady not returning enough - bdowns, 2010-08-26, 18:00
- Re: DataReady not returning enough - wodDamir, 2010-08-26, 18:32
- Re: DataReady not returning enough - bdowns, 2010-08-26, 18:57
- Re: DataReady not returning enough - wodDamir, 2010-08-26, 21:27
- Re: DataReady not returning enough - wodSupport, 2010-08-26, 21:30
- Re: DataReady not returning enough - wodSupport, 2010-08-26, 21:31
- Re: DataReady not returning enough - bdowns, 2010-08-26, 22:53
- Re: DataReady not returning enough - bdowns, 2010-08-26, 22:55
- Re: DataReady not returning enough - wodSupport, 2010-08-26, 22:58
- Re: DataReady not returning enough - bdowns, 2010-08-26, 23:16
- Re: DataReady not returning enough - wodSupport, 2010-08-26, 23:18
- Re: DataReady not returning enough - bdowns, 2010-08-27, 21:26
- Re: DataReady not returning enough - wodDamir, 2010-08-28, 00:48
- Re: DataReady not returning enough - bdowns, 2010-08-27, 21:26
- Re: DataReady not returning enough - wodSupport, 2010-08-26, 23:18
- Re: DataReady not returning enough - bdowns, 2010-08-26, 23:16
- Re: DataReady not returning enough - wodSupport, 2010-08-26, 22:58
- Re: DataReady not returning enough - bdowns, 2010-08-26, 22:55
- Re: DataReady not returning enough - bdowns, 2010-08-26, 22:53
- Re: DataReady not returning enough - wodSupport, 2010-08-26, 21:31
- Re: DataReady not returning enough - wodSupport, 2010-08-26, 21:30
- Re: DataReady not returning enough - wodDamir, 2010-08-26, 21:27
- Re: DataReady not returning enough - bdowns, 2010-08-26, 18:57
- Re: DataReady not returning enough - wodDamir, 2010-08-26, 18:32