Hello,
I’m using the WIP-plugin to reading mail from a POP3 Server.
The connection to the server works without problems.
But when i use the wip_read functions :
case WIP_CEV_READ:
pop3_ClientTestListReadHandler();
break;
void pop3_ClientTestListReadHandler(void)
{
ascii WDHRSP[50];
pop3_ClientTestCtx_t *pPop3ClientCtx = (pop3_ClientTestCtx_t *)&pop3_ClientTestCtx;
// While there are DATA to read
// ----------------------------
while( pPop3ClientCtx->listdataLengthMax > 0 )
{
int ReadBytes;
ReadBytes = wip_read( pPop3ClientCtx->ListChannel,
pPop3ClientCtx->plistdataBuffer,
pPop3ClientCtx->listdataLengthMax );
sprintf(WDHRSP, "pop3_ClientTestListReadHandler: read %d/%d \r\n",
ReadBytes, pPop3ClientCtx->listdataLength);
ADL_SEND_RSP(WDHRSP);
if (ReadBytes <= 0)
{
// If wip_read() not ready or failed, end loop
break;
}
/*
// Display the FileInfo
wip_debug( "MailId %s is %i bytes long.\n"
fi->entries[WIP_FOPT_NAME].ascii,
fi->entries[WIP_FOPT_SIZE].u32);
*/
// Update current pointer and length
pPop3ClientCtx->plistdataBuffer += ReadBytes;
pPop3ClientCtx->listdataLengthMax -= ReadBytes;
pPop3ClientCtx->listdataLength += ReadBytes;
}
}
Unfortunately, ReadBytes is always 0,
Can you help me ?
Thanks