Beispiel #1
0
ListNode *ParserFindItem(ListNode *Items, const char *Name)
{
    ListNode *Node, *Curr;
    char *Token=NULL;
    const char *ptr;


    ptr=Name;
    if (*ptr=='/')
    {
        Node=Items;
        ptr++;
        if (*ptr=='\0') return(Node);
    }
    else if (! Items->Side) Node=Items;
    else if (Items->Side->ItemType != ITEM_VALUE) Node=(ListNode *) Items->Side;


    if (Node && StrValid(ptr))
    {
        ptr=GetToken(ptr,"/",&Token,0);
        while (ptr)
        {
            if (Node->ItemType== ITEM_ROOT) Node=(ListNode *) ListFindNamedItem(Node,Token);
            else if (Node->ItemType != ITEM_VALUE) Node=(ListNode *) ListFindNamedItem((ListNode *) Node->Item,Token);

            if (! Node) break;
            ptr=GetToken(ptr,"/",&Token,0);
        }
    }
    else Node=ListGetNext(Items);

    DestroyString(Token);
    return(Node);
}
Beispiel #2
0
void STREAMSetItem(STREAM *S, const char *Name, void *Value)
{
ListNode *Curr;

if (! S->Items) S->Items=ListCreate();
Curr=ListFindNamedItem(S->Items,Name);
if (Curr) Curr->Item=Value;
else ListAddNamedItem(S->Items,Name,Value);
}
Beispiel #3
0
void *STREAMGetItem(STREAM *S, const char *Name)
{
ListNode *Curr;

if (! S->Items) return(NULL);
Curr=ListFindNamedItem(S->Items,Name);
if (Curr) return(Curr->Item);
return(NULL);
}
Beispiel #4
0
void DataProcessorSetValue(TProcessingModule *M, const char *Name, const char *Value)
{
char *ptr;
ListNode *Curr;

if (! M->Values) M->Values=ListCreate();
Curr=ListFindNamedItem(M->Values,Name);
if (Curr) Curr->Item = (void *) CopyStr( (char *) Curr->Item, Value);
else ListAddNamedItem(M->Values,Name,CopyStr(NULL,Value));
}
Beispiel #5
0
char *DataProcessorGetValue(TProcessingModule *M, const char *Name)
{
char *ptr;
ListNode *Curr;

if (! M->Values) return(NULL);
Curr=ListFindNamedItem(M->Values,Name);
if (Curr) return(Curr->Item);
return(NULL);
}
Beispiel #6
0
char *GetVar(ListNode *Vars, const char *Name)
{
ListNode *Node;
char *Tempstr=NULL;

Tempstr=CopyStr(Tempstr,Name);
//strlwr(Tempstr);
Node=ListFindNamedItem(Vars,Tempstr);
DestroyString(Tempstr);
if (Node) return((char *) Node->Item);
return(NULL);
}
Beispiel #7
0
void SetVar(ListNode *Vars, const char *Name, const char *Data)
{
ListNode *Node;
char *Tempstr=NULL;

Tempstr=CopyStr(Tempstr,Name);
//strlwr(Tempstr);
Node=ListFindNamedItem(Vars,Tempstr);
if (Node) Node->Item=(void *) CopyStr((char *) Node->Item,Data);
else ListAddNamedItem(Vars,Tempstr,CopyStr(NULL,Data));

DestroyString(Tempstr);
}
Beispiel #8
0
//Sanitize is more than 'Clean', it clears out any HTML string
char *SanitizeStr(char *Buffer, char *Data)
{
char *TagNamespace=NULL, *TagType=NULL, *TagData=NULL, *ptr;
char *RetStr=NULL, *Tempstr=NULL;

ptr=XMLGetTag(Data, &TagNamespace, &TagType, &TagData);
while (ptr)
{
	if (StrLen(TagType)==0) Tempstr=CatStr(Tempstr,TagData);
	else
	{
		if (
				ListFindNamedItem(Settings.SanitizeArgumentsAllowedTags,TagType) ||
				((*TagType=='/') && ListFindNamedItem(Settings.SanitizeArgumentsAllowedTags,TagType+1))
			)
		{
			if (StrLen(TagNamespace)) Tempstr=MCatStr(Tempstr,"<",TagNamespace,":",TagType,NULL);
			else Tempstr=MCatStr(Tempstr,"<",TagType,NULL);
			if (StrLen(TagData)) Tempstr=MCatStr(Tempstr," ",TagData,NULL);
			Tempstr=CatStr(Tempstr,">");
		}
	}


ptr=XMLGetTag(ptr, &TagNamespace, &TagType, &TagData);
}

RetStr=HTTPQuote(Buffer,Tempstr);

DestroyString(TagNamespace);
DestroyString(Tempstr);
DestroyString(TagType);
DestroyString(TagData);


return(RetStr);
}
Beispiel #9
0
void LogFileClose(const char *Path)
{
ListNode *Node;
TLogFile *LogFile;

Node=ListFindNamedItem(LogFiles,Path);
if (Node)
{
LogFile=(TLogFile *) Node->Item;
ListDeleteNode(Node);
DestroyString(LogFile->Path);
STREAMClose(LogFile->S);
free(LogFile);
}
}
Beispiel #10
0
int STREAMDeleteDataProcessor(STREAM *S, char *Class, char *Name)
{
ListNode *Curr;
char *Tempstr=NULL;
int len;

STREAMFlush(S);

Tempstr=MCopyStr(Tempstr,Class,":",Name,NULL);
Curr=ListFindNamedItem(S->ProcessingModules,Tempstr);
ListDeleteNode(Curr);

DestroyString(Tempstr);
return(TRUE);
}
Beispiel #11
0
void UnsetVar(ListNode *Vars,const char *Name)
{
ListNode *Curr;
char *Str=NULL;
char *Tempstr=NULL;

if (Vars) return;
Tempstr=CopyStr(Tempstr,Name);
strlwr(Tempstr);
Curr=ListFindNamedItem(Vars,Tempstr);
if (Curr)
{
    Str=ListDeleteNode(Curr);
    DestroyString(Str);
}
DestroyString(Tempstr);
}
Beispiel #12
0
void ConfigFileSaveFileStore(TFileStore *FS)
{
ListNode *Curr;
TFileStore *Old;

Curr=ListFindNamedItem(FileStores,FS->Name);
if (Curr) 
{
	Old=(TFileStore *) Curr->Item;
	DestroyFileStore(Old);
	Curr->Item=FileStoreClone(FS);	
}
else ListAddNamedItem(FileStores,FS->Name,FileStoreClone(FS));


ConfigFileSaveFileStores();
}
Beispiel #13
0
void ResetTTY(int tty)
{
struct termios *tty_data;
char *Tempstr=NULL;
ListNode *Curr;

Tempstr=FormatStr(Tempstr,"%d",tty);
Curr=ListFindNamedItem(TTYAttribs,Tempstr);
if (Curr)
{
	tty_data=(struct termios *) Curr->Item;
	tcsetattr(tty,TCSANOW,tty_data);
	ListDeleteNode(Curr);
	free(tty_data);
}

DestroyString(Tempstr);
}
Beispiel #14
0
const char *OAuthLookup(const char *Name, int Refresh)
{
    ListNode *Curr;
    OAUTH *OA;

    Curr=ListFindNamedItem(OAuthKeyChain, Name);
    if (Curr)
    {
        OA=(OAUTH *) Curr->Item;
        if (Refresh && StrValid(OA->RefreshToken))
        {
            OAuthRefresh(OA, OA->RefreshURL);
            OAuthSave(OA, "");
        }
        if (StrValid(OA->AccessToken)) return(OA->AccessToken);
    }

    return("");
}
Beispiel #15
0
void ExtractVarsReadVar(const char **Fmt, const char **Msg, ListNode *Vars)
{
const char *FmtPtr, *MsgPtr;
char *VarName=NULL;
int len=0;
ListNode *Node;

FmtPtr=*Fmt;

  if (*FmtPtr=='(') FmtPtr++;
	while (*FmtPtr != ')')
	{
		VarName=AddCharToBuffer(VarName,len,*FmtPtr);
		len++;
		FmtPtr++;
	}
  if (*FmtPtr==')') FmtPtr++;

MsgPtr=*Msg;
while ((*MsgPtr !=0) && (*MsgPtr != *FmtPtr))
{
 if (*MsgPtr=='"')
 {
		do 
		{
			MsgPtr++;
		} while ((*MsgPtr != '"') && (*MsgPtr != 0));
 }
 MsgPtr++;
}

Node=ListFindNamedItem(Vars,VarName);

if (Node) Node->Item=(void *) CopyStrLen((char *) Node->Item, *Msg, MsgPtr-*Msg);
else Node=ListAddNamedItem(Vars,VarName,CopyStrLen(NULL, *Msg, MsgPtr-*Msg));

*Fmt=FmtPtr;
*Msg=MsgPtr;

DestroyString(VarName);
}
Beispiel #16
0
const char *ParserGetValue(ListNode *Items, const char *Name)
{
    ListNode *Node;

    if (Items)
    {
        Node=Items;
        if (strchr(Name,'/'))
        {
            Node=ParserFindItem(Node, Name);
            if (Node) return((const char *) Node->Item);
        }
        else
        {
            if (Node->ItemType==ITEM_ENTITY) Node=(ListNode *) Node->Item;
            if (Node) Node=ListFindNamedItem(Node, Name);
            if (Node) return((const char *) Node->Item);
        }
    }

    return("");
}
Beispiel #17
0
TLogFile *LogFileGetEntry(const char *FileName)
{
	ListNode *Node;
	TLogFile *LogFile=NULL;
	STREAM *S=NULL;

	if (! StrLen(FileName)) return(NULL);
	if (! LogFiles) LogFiles=ListCreate();
	if (! LogFileDefaults) LogFileSetupDefaults();

	Node=ListFindNamedItem(LogFiles,FileName);
	if (Node) LogFile=(TLogFile *) Node->Item;
	else
	{
		if (strcmp(FileName,"STDOUT")==0) S=STREAMFromFD(1);
		else if (strcmp(FileName,"STDERR")==0) S=STREAMFromFD(2);
		else if (strcmp(FileName,"SYSLOG")==0) S=STREAMCreate();
		else
		{
			S=STREAMOpenFile(FileName,SF_CREAT | SF_APPEND | SF_WRONLY);
		}

		if (S)
		{
			LogFile=(TLogFile *) calloc(1,sizeof(TLogFile));
			LogFile->Path=CopyStr(LogFile->Path,FileName);
			LogFile->LogFacility=LogFileDefaults->LogFacility;
			LogFile->Flags=LogFileDefaults->Flags;
			LogFile->MaxSize=LogFileDefaults->MaxSize;
			LogFile->S=S;
			if (strcmp(FileName,"SYSLOG")==0) LogFile->Flags |= LOGFILE_SYSLOG;
			ListAddNamedItem(LogFiles,FileName,LogFile);
			STREAMSetItem(S,"TLogFile",LogFile);
		}
	}

	return(LogFile);
}
Beispiel #18
0
void OAuthDestroy(void *p_OAuth)
{
    OAUTH *Ctx;
    ListNode *Curr;

    Ctx=(OAUTH *) p_OAuth;
    Curr=ListFindNamedItem(OAuthKeyChain, Ctx->Name);
    if (Curr) ListDeleteNode(Curr);

    DestroyString(Ctx->Name);
    DestroyString(Ctx->Stage1);
    DestroyString(Ctx->Stage2);
    DestroyString(Ctx->VerifyTemplate);
    DestroyString(Ctx->AccessToken);
    DestroyString(Ctx->RefreshToken);
    DestroyString(Ctx->RefreshURL);
    DestroyString(Ctx->VerifyURL);
    DestroyString(Ctx->VerifyCode);
    DestroyString(Ctx->Creds);
    DestroyString(Ctx->SavePath);
    ListDestroy(Ctx->Vars, Destroy);
    free(Ctx);
}
int ProcessHashCompare(TFileStore *DiskFS, TFileStore *FS, char *Command, char *Pattern, int CmdFlags, ListNode *Vars)
{
ListNode *Items=NULL, *DestinationItems=NULL, *Curr, *Node;
char *H1=NULL, *H2=NULL;
char *IncludePattern=NULL, *ExcludePattern=NULL;
int result=CMP_FAIL, Flags=0, Checked=0, Differs=0, val;
int CompareLevel=0;
TFileInfo *FI, *RemoteFI;

DestinationItems=ListCreate();

Flags=LIST_REFRESH;
if (CmdFlags & FLAG_CMD_RECURSE) Flags |= LIST_INCLUDE_DIRS;
FileStoreLoadDir(FS,Pattern,DestinationItems, Flags);
IncludePattern=CopyStr(IncludePattern,GetVar(Vars,"IncludePattern"));
ExcludePattern=CopyStr(ExcludePattern,GetVar(Vars,"ExcludePattern"));


Items=ListCreate();
DiskFS->LoadDir(DiskFS,Pattern,Items,0);
Curr=ListGetNext(Items);

while (Curr)
{
	FI=(TFileInfo *) Curr->Item;

	if (FileIncluded(FI,IncludePattern,ExcludePattern,CmdFlags, Vars))
	{
	Node=ListFindNamedItem(DestinationItems,FI->Name);
	if (Node) RemoteFI=(TFileInfo *) Node->Item;
	else RemoteFI=NULL;

	if ((FI->Type==FTYPE_DIR) && (CmdFlags & FLAG_CMD_RECURSE))
	{
		if (DiskFS->ChDir(DiskFS,FI->Name))
		{
			if (FS->ChDir(FS,FI->Name))
			{
				if (CmdFlags & FLAG_CMD_VERBOSE) printf("Entering %s\n",FI->Path);
				ProcessHashCompare(DiskFS, FS, Command, "*", CmdFlags,Vars);
				FS->ChDir(FS,"..");
			}
			else printf("Failed to enter remote dir %s\n",FI->Path);
			DiskFS->ChDir(DiskFS,"..");
		}
		else printf("Failed to enter local dir %s\n",FI->Path);
	}
	else
	{
		FS->GetDigest(FS,FI->Name,"md5",&H1);
		DiskFS->GetDigest(DiskFS,FI->Name,"md5",&H2);

		if (H1 && H2 && (strcmp(H1,H2)==0)) 
		{
				if (CmdFlags & FLAG_CMD_QUIET) /*Do nothing in quiet mode */  ; 
				else printf("OKAY: Remote=%s Local=%s %s\n",H1,H2,FI->Path);
		}
		else printf("FAIL: Remote=%s Local=%s %s\n",H1,H2,FI->Path);
	}
	}
Curr=ListGetNext(Curr);
}



ListDestroy(DestinationItems,FileInfoDestroy);
ListDestroy(Items,FileInfoDestroy);

DestroyString(ExcludePattern);
DestroyString(IncludePattern);
DestroyString(H1);
DestroyString(H2);

return(result);
}
Beispiel #20
0
void InitTTY(int tty, int LineSpeed, int Flags)
{
struct termios tty_data, *old_tty_data;
int result, val;
char *Tempstr=NULL;
ListNode *Curr;

Tempstr=FormatStr(Tempstr,"%d",tty);
if (! TTYAttribs) TTYAttribs=ListCreate();
Curr=ListFindNamedItem(TTYAttribs,Tempstr);

if (! Curr)
{
old_tty_data=(struct termios *) calloc(1,sizeof(struct termios));
ListAddNamedItem(TTYAttribs,Tempstr,old_tty_data);
}
else old_tty_data=(struct termios *) Curr->Item;

tcgetattr(tty,old_tty_data);
//tcgetattr(tty,&tty_data);
memset(&tty_data,0,sizeof(tty_data));

//ignore break characters and parity errors
tty_data.c_iflag=IGNBRK | IGNPAR;

//Enable Special Characters
if (Flags & TTYFLAG_CANON) tty_data.c_iflag|= ICANON;
//else tty_data.c_iflag &= ~ICANON;


/*
if (! (Flags & TTYFLAG_CRLF_KEEP))
{
	//translate carriage-return to newline
	if (Flags & TTYFLAG_CRLF) tty_data.c_iflag |= ICRNL;
	else tty_data.c_iflag &= ~ICRNL;

	//translate newline to carriage return
	if (Flags & TTYFLAG_LFCR) 
	{
		tty_data.c_iflag |= INLCR;
	}
	else tty_data.c_iflag &= ~INLCR;

	//output flags
	tty_data.c_oflag=0;
	//postprocess and translate newline to cr-nl
	if (Flags & TTYFLAG_LFCR) tty_data.c_oflag |= ONLCR | OPOST;
}
*/

tty_data.c_cflag=CREAD | CS8 | HUPCL | CLOCAL;
if (Flags & TTYFLAG_SOFTWARE_FLOW) 
{
tty_data.c_iflag |= IXON | IXOFF;
}
if (Flags & TTYFLAG_HARDWARE_FLOW) tty_data.c_cflag |=CRTSCTS;
if (Flags & TTYFLAG_ECHO) tty_data.c_cflag |= ECHO;

tty_data.c_lflag=0;
if (Flags & TTYFLAG_ISIG) tty_data.c_lflag=ISIG;

tty_data.c_cc[VMIN]=1;
tty_data.c_cc[VTIME]=0;

if (LineSpeed > 0)
{
switch (LineSpeed)
{
case 2400: val=B2400; break;
case 4800: val=B4800; break;
case 9600: val=B9600; break;
case 19200: val=B19200; break;
case 38400: val=B38400; break;
case 57600: val=B57600; break;
case 115200: val=B115200; break;
case 230400: val=B230400; break;
#ifdef B460800
case 460800: val=B460800; break;
#endif
#ifdef B500000
case 500000: val=B500000; break;
#endif
#ifdef B1000000
case 10000000: val=B1000000; break;
#endif
#ifdef B1152000
case 1152000: val=B1152000; break;
#endif
#ifdef B2000000
case 2000000: val=B2000000; break;
#endif
#ifdef B4000000
case 4000000: val=B4000000; break;
#endif
default: val=B115200; break;
}
cfsetispeed(&tty_data,val);
cfsetospeed(&tty_data,val);
}

tcflush(tty,TCIFLUSH);
result=tcsetattr(tty,TCSANOW,&tty_data);

DestroyString(Tempstr);
}
int ProcessCompare(TFileStore *DiskFS, TFileStore *FS, char *Command, char *Pattern, int CmdFlags, ListNode *Vars)
{
ListNode *Items=NULL, *DestinationItems=NULL, *Curr, *Node;
char *Tempstr=NULL, *ptr;
char *IncludePattern=NULL, *ExcludePattern=NULL;
int result=CMP_FAIL, Flags=0, Checked=0, Differs=0, val;
int CompareLevel=0;
TFileInfo *FI, *RemoteFI;


//if we've been given a path to something a few directories down, then do this
ptr=strrchr(Pattern,'/');
if (ptr)
{
  Tempstr=CopyStrLen(Tempstr,Pattern,ptr-Pattern);
  ptr++;
	result=InternalProcessCompareDir(DiskFS, FS, Command, Tempstr, ptr, CmdFlags, Vars);
  DestroyString(Tempstr);
  return(result);
}


DestinationItems=ListCreate();
FileStoreLoadDir(FS,Pattern,DestinationItems, LIST_REFRESH);
IncludePattern=CopyStr(IncludePattern,GetVar(Vars,"IncludePattern"));
ExcludePattern=CopyStr(ExcludePattern,GetVar(Vars,"ExcludePattern"));
CompareLevel=atoi(GetVar(Vars,"CMP:CompareLevel"));

if (CmdFlags & FLAG_CMD_VERBOSE) HandleEventMessage(Settings.Flags,"INFO: Comparing files by %s",GetCompareLevelName(CompareLevel));

Items=ListCreate();
DiskFS->LoadDir(DiskFS,Pattern,Items,CompareLevel);
Curr=ListGetNext(Items);

while (Curr)
{
	FI=(TFileInfo *) Curr->Item;

	if (FileIncluded(FI,IncludePattern,ExcludePattern,CmdFlags, Vars))
	{
	Node=ListFindNamedItem(DestinationItems,FI->Name);
	if (Node) RemoteFI=(TFileInfo *) Node->Item;
	else RemoteFI=NULL;

	result=FileStoreCompareFile(FS,DiskFS,RemoteFI,FI,CompareLevel);
	Tempstr=CopyStr(Tempstr,FI->Name);
	Checked++;
	
	if ((result == CMP_DIR) && (CmdFlags & FLAG_CMD_RECURSE)) InternalProcessCompareDir(DiskFS, FS, Command, FI->Name, "*", CmdFlags, Vars);
	else
	{
		HandleCompareResult(FI, CmdFlags, CompareLevel, GetVar(Vars,"Hook"), result);
		if (result < CompareLevel) Differs++;
	}
	}
Curr=ListGetNext(Curr);
}


Curr=ListGetNext(DestinationItems);
while (Curr)
{
	FI=(TFileInfo *) Curr->Item;

	if (FileIncluded(FI,IncludePattern,ExcludePattern,CmdFlags, Vars)) 
	{
		
		if (! ListFindNamedItem(Items,FI->Name)) 
		{
			Tempstr=CopyStr(Tempstr,"");
			HandleCompareResult(FI, CmdFlags, CompareLevel, GetVar(Vars,"Hook"), CMP_REMOTE);
			Differs++;
			Checked++;
		}
	}

Curr=ListGetNext(Curr);
}

val=atoi(GetVar(Vars,"CMP:Differs")) + Differs;
Tempstr=FormatStr(Tempstr,"%d",val);
SetVar(Vars,"CMP:Differs",Tempstr);

val=atoi(GetVar(Vars,"CMP:Checked")) + Checked;
Tempstr=FormatStr(Tempstr,"%d",val);
SetVar(Vars,"CMP:Checked",Tempstr);



ListDestroy(DestinationItems,FileInfoDestroy);
ListDestroy(Items,FileInfoDestroy);

DestroyString(ExcludePattern);
DestroyString(IncludePattern);
DestroyString(Tempstr);

return(result);
}
//This accepts a single pattern to match against. If that includes a space, it is thought to be a filename
//with a space in. To supply multiple patterns look at "ProcessPutFiles" below.
int InternalTransferFiles(TTransferContext *Ctx, char *Pattern)
{
ListNode *SrcItems=NULL, *DestItems=NULL, *Curr, *Node;
TFileInfo *FI, *NewFI, *DestFI;
int result=FALSE, IncludeResult=0;
char *Tempstr=NULL, *ptr;
int val;

//if we've been given a path to something a few directories down, then do this
if (Ctx->CmdFlags & FLAG_CMD_FULLPATH)
{
	ptr=strrchr(Pattern,'/');
	if (StrLen(ptr) > 1)
	{
 		Tempstr=CopyStrLen(Tempstr,Pattern,ptr-Pattern);
		ptr++;
		result=InternalTransferDir(Ctx, Tempstr, ptr);
		DestroyString(Tempstr);
		return(result);
	}
}


SrcItems=ListCreate();
SrcItems->Flags |= LIST_FLAG_CASE;

if (Ctx->CmdFlags & FLAG_CMD_SYNC)
{
	DestItems=ListCreate();
	DestItems->Flags |= LIST_FLAG_CASE;
	FileStoreLoadDir(Ctx->DestFS,"*",DestItems, LIST_REFRESH | Ctx->CompareLevel);
	FileStoreLoadDir(Ctx->SrcFS,Pattern,SrcItems, LIST_REFRESH | Ctx->CompareLevel);
}
else FileStoreLoadDir(Ctx->SrcFS,Pattern,SrcItems, LIST_REFRESH);


Curr=ListGetNext(SrcItems);

if (! Curr) result=FALSE;

while (Curr)
{
	FI=(TFileInfo *) Curr->Item;


	Node=ListFindNamedItem(DestItems,FI->Name);
	if (Node) DestFI=(TFileInfo *) Node->Item;
	else DestFI=NULL;

	if (FileIncluded(FI,Ctx->IncludePattern,Ctx->ExcludePattern,Ctx->CmdFlags, Ctx->Vars))
	{
	IncludeResult=FileNeedsTransfer(Ctx, FI, DestFI);
	switch (IncludeResult)
	{
		case TRUE:
		if (FI->Type==FTYPE_DIR) 
		{
				result=InternalTransferDir(Ctx, FI->Name, "*");
				if (result != TRANSFER_OKAY) Ctx->Failed++;
		}
		else 
		{
			if ((FI->Type==FTYPE_LINK))
			{
 				if (Ctx->DestFS->Settings & FS_SYMLINKS) result=Ctx->DestFS->Symlink(Ctx->DestFS, FI->Name, FI->EditPath);
			 	else result=InternalTransferDir(Ctx, FI->Name, "*");
			}
			else result=InternalCopyFile(Ctx, FI);

			HandleTransferResult(Ctx, FI, result);
			if (result >= TRANSFER_OKAY) Ctx->Transferred++;
			else Ctx->Failed++;
		}
		break;

		case SKIP_EXISTS:
			if (Ctx->CmdFlags & FLAG_CMD_VERBOSE) HandleEventMessage(Settings.Flags,"INFO: '%s' exists, skipping.",FI->Name); 
		break;

		case SKIP_AGE:
			if (Ctx->CmdFlags & FLAG_CMD_VERBOSE) HandleEventMessage(Settings.Flags,"INFO: '%s' doesn't match required age, skipping.",FI->Name); 
		break;

		case SKIP_FILETYPE:
			if (Ctx->CmdFlags & FLAG_CMD_VERBOSE) HandleEventMessage(Settings.Flags,"INFO: '%s' unsupported filetype, skipping.",FI->Name); 
		break;

	}
	Ctx->Total++;
	}

	if (result==ERR_CANCEL) break;
	Curr=ListGetNext(Curr);
}

ListDestroy(DestItems,FileInfoDestroy);
ListDestroy(SrcItems,FileInfoDestroy);
DestroyString(Tempstr);

return(result);
}