Make linux installer ftp download correctly by flushing the control connection

after file transfer has completed. [nsbeta3+ b=52287; r=ssu]

Also, make the folder selection dialog cancel button *actually* destroy the
dialog when clicked. [r=ssu]
This commit is contained in:
sgehani%netscape.com 2000-09-12 23:36:12 +00:00
Родитель 483eac7047
Коммит f6e5d43329
2 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -196,7 +196,15 @@ BAIL:
RawClose(mDataFd);
mDataFd = -1;
}
if (connfd > 0)
{
RawClose(connfd);
/* flush control connection after closing data connection */
respBufSize = RESP_BUF_SIZE;
RawRecv((unsigned char *)resp, &respBufSize, mCntlFd);
}
mState = OPEN;
return err;
@ -496,7 +504,7 @@ nsFTPConn::RawRecv(unsigned char *aBuf, int *aBufSize, int aFd)
break;
}
// XXX TODO: prevent inf loop retruning at TIMEOUT_THREASHOLD_USECS
// XXX TODO: prevent inf loop returning at TIMEOUT_THRESHOLD_USECS
if (!FD_ISSET(aFd, &selset))
continue; /* not ready to read; retry */

Просмотреть файл

@ -655,6 +655,7 @@ nsSetupTypeDlg::SelectFolderCancel(GtkWidget *aWidget,
GtkFileSelection *aFileSel)
{
// tear down file sel dlg
gtk_object_destroy(GTK_OBJECT(aWidget));
gtk_object_destroy(GTK_OBJECT(aFileSel));
sFilePickerUp = FALSE;
}