if (!pish->leaveMailOnServer) {
if (!(pish->flags & leaveMailOnServer)) {
doPop3Loop(ptcx_t ptcx, mail_command_t *cmd, cmd_stats_t *ptimer, void *mystate){    doPOP3_state_t	*me = (doPOP3_state_t *)mystate;    char	command[MAX_COMMAND_LEN];    char	respBuffer[MAX_RESPONSE_LEN];    int		rc, numBytes;    pish_stats_t	*stats = (pish_stats_t *)ptimer->data;    pish_command_t	*pish = (pish_command_t *)cmd->data;    if (me->msgCounter >= me->numMsgs) return -1; /* done, close */    /* retr the msgs */    /* send the RETR command */    sprintf(command, "RETR %d%s", ++me->msgCounter, CRLF);    event_start(ptcx, &stats->msgread);    rc = sendCommand(ptcx, ptcx->sock, command);    if (rc == -1) {	event_stop(ptcx, &stats->msgread);	if (gf_timeexpired < EXIT_FAST) {	    stats->msgread.errs++;	    returnerr(debugfile,"POP3 Error sending RETR %d command: %s\n",		      me->msgCounter, neterrstr());	}	doPop3Exit (ptcx, me);	return -1;    }    /* read msg */    numBytes = retrMsg(ptcx, NULL, 0 , ptcx->sock);    event_stop(ptcx, &stats->msgread);    if (numBytes <= 0) {	if (gf_timeexpired < EXIT_FAST) {	    stats->msgread.errs++;	    returnerr(debugfile,"POP3 Error retrieving msg %d: %s\n",		      me->msgCounter, neterrstr());	}	doPop3Exit (ptcx, me);	return -1;    }      /* if we're not told to leave mail on server, delete the message */    if (!pish->leaveMailOnServer) {	/* send the DELE command */	sprintf(command, "DELE %d%s", me->msgCounter, CRLF);	event_start(ptcx, &stats->cmd);	rc = doPopCommandResponse(ptcx, ptcx->sock, command, respBuffer, sizeof(respBuffer));	event_stop(ptcx, &stats->cmd);	if (rc == -1) {	    if (gf_timeexpired < EXIT_FAST) {		stats->cmd.errs++;	    }	    doPop3Exit (ptcx, me);	    return -1;	}    }    return 0;}