mirror of
https://github.com/glest/glest-source.git
synced 2025-08-27 17:59:48 +02:00
- updated win32 vc++ files to compile with new ftp server / client
This commit is contained in:
@@ -263,6 +263,7 @@ LOCAL int ftpCmdAbor(int sessionId, const char* args, int len)
|
||||
#define MLSD 8
|
||||
LOCAL int sendListing(socket_t dataSocket, int sessionId, const char* path, int format)
|
||||
{
|
||||
int haveAnySuccessfulFiles = 0;
|
||||
void *dir;
|
||||
const char monName[12][4] = {
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
||||
@@ -285,10 +286,10 @@ LOCAL int sendListing(socket_t dataSocket, int sessionId, const char* path, int
|
||||
printf("about to read dir contents [%s]\n", path);
|
||||
#endif
|
||||
|
||||
int haveAnySuccessfulFiles = 0;
|
||||
haveAnySuccessfulFiles = 0;
|
||||
while((dirEntry = ftpReadDir(dir)) != NULL)
|
||||
{
|
||||
char * realPath = ftpGetRealPath(sessionId, dirEntry, FALSE);
|
||||
const char * realPath = ftpGetRealPath(sessionId, dirEntry, FALSE);
|
||||
int statResult = ftpStat(realPath, &fileInfo);
|
||||
#if DBG_LOG
|
||||
printf("ftpGetRealPath() returned [%s] stat() = %d\n", realPath, statResult);
|
||||
@@ -488,12 +489,13 @@ LOCAL int ftpCmdRetr(int sessionId, const char* args, int len)
|
||||
const char* realPath = ftpGetRealPath(sessionId, args, TRUE);
|
||||
socket_t s;
|
||||
void *fp;
|
||||
int statResult = 0;
|
||||
|
||||
#if DBG_LOG
|
||||
printf("ftpCmdRetr args [%s] realPath [%s]\n", args, realPath);
|
||||
#endif
|
||||
|
||||
int statResult = ftpStat(realPath, &fileInfo);
|
||||
statResult = ftpStat(realPath, &fileInfo);
|
||||
#if DBG_LOG
|
||||
printf("stat() = %d fileInfo.type = %d\n", statResult,fileInfo.type);
|
||||
#endif
|
||||
|
@@ -322,6 +322,7 @@ socket_t ftpCreateServerSocket(void)
|
||||
SOCKET theServer;
|
||||
struct sockaddr_in serverinfo;
|
||||
unsigned len;
|
||||
int val = 1;
|
||||
|
||||
theServer = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if(theServer < 0)
|
||||
@@ -331,8 +332,7 @@ socket_t ftpCreateServerSocket(void)
|
||||
serverinfo.sin_addr.s_addr = INADDR_ANY;
|
||||
serverinfo.sin_port = htons(21);
|
||||
len = sizeof(serverinfo);
|
||||
|
||||
int val = 1;
|
||||
|
||||
#ifndef WIN32
|
||||
setsockopt(theServer, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val));
|
||||
#else
|
||||
|
@@ -283,7 +283,7 @@ void LogFileThread::saveToDisk(bool forceSaveAll,bool logListAlreadyLocked) {
|
||||
// logCount = min(logCount,(std::size_t)2000000);
|
||||
//}
|
||||
|
||||
for(int i = 0; i < logCount; ++i) {
|
||||
for(unsigned int i = 0; i < logCount; ++i) {
|
||||
LogFileEntry &entry = tempLogList[i];
|
||||
SystemFlags::logDebugEntry(entry.type, entry.entry, entry.entryDateTime);
|
||||
}
|
||||
|
@@ -397,7 +397,7 @@ std::vector<string> IRCThread::GetIRCConnectedNickList(string target, bool waitF
|
||||
bool IRCThread::isConnected() {
|
||||
bool ret = false;
|
||||
if(ircSession != NULL) {
|
||||
ret = irc_is_connected(ircSession);
|
||||
ret = (irc_is_connected(ircSession) != 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user