Re: Fedora 4, sitecopy and sftp problems (Fixed)
Neil Cherry <[email protected]> Mon, 02 Jan 2006 05:13:12 -0500
| Newsgroups | gmane.comp.web.sitecopy |
|---|---|
| Message-ID | <[email protected]> |
I made the following change and it's now working under Fedora. I
haven't tried it under Gentoo to see if it break anything.
static int read_sftp(sftp_session *sess) {
size_t pos = 0;
write(sess->fd_out, "\r\n", 2); /* fixes a problem with Fedora 4 */
do {
ssize_t ret = read(sess->fd_in, sess->buf+pos, BUFSIZ-pos);
if (ret < 0) return SITE_FAILED;
if (ret == 0) break;
pos += ret;
sess->buf[pos] = '\0';
} while (strchr(sess->buf, '>') == NULL && pos < BUFSIZ);
NE_DEBUG(DEBUG_SFTP, "(%s)", sess->buf);
return SITE_OK;
}
--
Linux Home Automation Neil Cherry [email protected]
http://www.linuxha.com/ Main site
http://linuxha.blogspot.com/ My HA Blog
http://home.comcast.net/~ncherry/ Backup site
_______________________________________________
sitecopy maillist - [email protected]
http://dav.lyra.org/mailman/listinfo/sitecopy