亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pop3_client.c

?? 在freescale 的ne64上開發的源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
								continue;
							}

							if( ch == ' ')		/* Remove spaces	*/
								continue;

							/* Buffer already full for this line?	*/

							if(pop3_client.charsinheaderbuf > 8)
								continue;

							/* End of header? (parsing of that is not absolutely correct)	*/
							/* We detect it from CRLF. or LFCR. or CR. or LF.				*/
							/* the correct indication being CRLF.CRLF						*/

							if( (ch == '.') && (pop3_client.charsinheaderbuf == 0) ) {
								/* Remove CRLF.CRLF from header length	*/

								if( pop3_client.curmsghlen >= 5 )
									pop3_client.curmsghlen -= 5;

								pop3c_changestate(POP3C_TOP0_GET);
								break;
							}


							ch = __tolower(ch);

							pop3_client.headerbuf[pop3_client.charsinheaderbuf] = ch;
							pop3_client.charsinheaderbuf++;
							pop3_client.headerbuf[pop3_client.charsinheaderbuf] = '\0';

							/* Is it 'from:' ?	*/

							if(bufsearch(&pop3_client.headerbuf[0],pop3_client.charsinheaderbuf, (BYTE*)("from:")) == 0) {
								/* Continue imidiately to read sender	*/

								pop3_client.from[0] = '\0';
								pop3_client.charsinheaderbuf = 0;
								pop3c_changestate(POP3C_RECEIVING_HDR_FROM);
								continue;
							}

							/* Is it 'subject:' ?	*/

							if(bufsearch(&pop3_client.headerbuf[0],pop3_client.charsinheaderbuf,(BYTE*)("subject:")) == 0) {
								/* Continue imidiately to read subject	*/

								pop3_client.subject[0] = '\0';
								pop3_client.charsinheaderbuf = 0;
								pop3c_changestate(POP3C_RECEIVING_HDR_SUBJ);
								continue;
							}

						}	/* of RECEIVING_HEADER	*/


						if( pop3_client.state == POP3C_RECEIVING_HDR_FROM) {
							if( ch == ' '){		/* Remove spaces	*/
								if(pop3_client.charsinheaderbuf == 0)
									continue;
							}

							if( ch == '\r')	{
								pop3_client.charsinheaderbuf = 0;
								pop3c_changestate(POP3C_RECEIVING_HEADER);
								continue;
							}

							if( ch == '\n')	{
								pop3_client.charsinheaderbuf = 0;
								pop3c_changestate(POP3C_RECEIVING_HEADER);
								continue;
							}

							/* Store it	*/

							pop3_client.from[pop3_client.charsinheaderbuf] = ch;
							pop3_client.charsinheaderbuf++;
							pop3_client.from[pop3_client.charsinheaderbuf] = '\0';

							if(pop3_client.charsinheaderbuf >= POP3C_SENDERMAXLEN) {
								/* The buffer is exeeded	*/
								/* Mark it corrupted		*/

								pop3_client.from[0] = '\0';
								pop3c_changestate(POP3C_RECEIVING_HEADER);
								continue;
							}

						} 	/* of RECEIVING_HDR_FROM	*/


						if( pop3_client.state == POP3C_RECEIVING_HDR_SUBJ) {
							if( ch == ' '){		/* Remove spaces	*/
								if(pop3_client.charsinheaderbuf == 0)
									continue;
							}

							if( ch == '\r')	{
								pop3_client.charsinheaderbuf = 0;
								pop3c_changestate(POP3C_RECEIVING_HEADER);
								continue;
							}

							if( ch == '\n')	{
								pop3_client.charsinheaderbuf = 0;
								pop3c_changestate(POP3C_RECEIVING_HEADER);
								continue;
							}

							/* Store it	*/

							pop3_client.subject[pop3_client.charsinheaderbuf] = ch;
							pop3_client.charsinheaderbuf++;
							pop3_client.subject[pop3_client.charsinheaderbuf] = '\0';

							if(pop3_client.charsinheaderbuf >= POP3C_SUBJECTMAXLEN)	{
								/* The buffer is exeeded	*/
								/* Mark it corrupted		*/

								pop3_client.subject[0] = '\0';
								pop3c_changestate(POP3C_RECEIVING_HEADER);
								continue;
							}

						} 	/* of RECEIVING_HDR_SUBJ	*/


					}


					break;


				case POP3C_RETR_SENT:

					if(cmd == POP3C_OK)	{
						DEBUGOUT("RETR +OK by POP3 server\r\n");

						/* Continue imidiately to receive message	*/

						pop3c_changestate(POP3C_RECEIVING_MSG_HEADER);

					} else
						break;

				case POP3C_RECEIVING_MSG_HEADER:

					/* Try to find empty row to detect the start of actual message	*/

					match = 0;
					NETWORK_RECEIVE_INITIALIZE(received_tcp_packet.buf_index);

					for(i=0; i < (UINT16)par1; i++)	{
						ch = RECEIVE_NETWORK_B();

						if(match == 0)	{
							if( (ch == '\r') || (ch == '\n') )
								match++;
							else
								match = 0;
							continue;
						}

						if(match == 1) {
							if( (ch == '\r') || (ch == '\n'))
								match++;
							else
								match = 0;
							continue;
						}

						if(match == 2) {
							if( (ch == '\r') || (ch == '\n'))
								match++;
							else
								match = 0;
							continue;
						}

						if(match == 3) {
							if( (ch == '\r') || (ch == '\n')) {
								match++;

								/* Continue to read the actual msg	*/
								par1 -= (i + 1);
								pop3c_changestate(POP3C_RECEIVING_MSG);
								break;
							} else
								match = 0;
							continue;
						}

					}

					/* If we don't find the end of header we will timeout	*/
					/* on pop3c_run so no error handling here				*/

					if( pop3_client.state != POP3C_RECEIVING_MSG)
						break;

					end_detect = 0;
					case POP3C_RECEIVING_MSG:

						/* Search is this packet end of msg and do not give	*/
						/* CRLF.CRLF to application							*/
						for(i=0; i < (UINT16)par1; i++)	{
							ch = RECEIVE_NETWORK_B();

							pop3c_data(ch);

							if( (ch == '\r') && (end_detect != 3))
								end_detect = 0;


							if( end_detect == 0 ) {
								if(ch == '\r')
									end_detect++;
								else
									end_detect = 0;

								continue;
							}

							if( end_detect == 1 ){
								if(ch == '\n')
									end_detect++;
								else
									end_detect = 0;

								continue;
							}

							if( end_detect == 2 ){
								if(ch == '.')
									end_detect++;
								else
									end_detect = 0;

								continue;
							}

							if( end_detect == 3 ){
								if(ch == '\r')
									end_detect++;
								else
									end_detect = 0;

								continue;
							}

							if( end_detect == 4 ){
								if(ch == '\n') {
									pop3c_changestate(POP3C_MESSAGE_RECEIVED);
									return(1);
								}
								else
									end_detect = 0;

								continue;
							}

						}

						break;

					case POP3C_DELE_SENT:

						if(cmd == POP3C_OK)	{
							DEBUGOUT("DELE +OK by POP3 server\r\n");
							pop3c_changestate(POP3C_DELE_ACKED);
							return(1);
						}

						break;

					case POP3C_QUIT_SENT:

						if(cmd == POP3C_OK)	{
							DEBUGOUT("QUIT +OK by POP3 server\r\n");
							pop3c_changestate(POP3C_QUIT_ACKED);
							return(1);
						}

						break;


				default:
					break;


			}


			return(1);


		case TCP_EVENT_REGENERATE:

			/* Send last packet again	*/

			DEBUGOUT("POP3C is regenerating...\r\n");

			switch (pop3_client.state) {

				case POP3C_USERNAME_SENT:
					pop3c_senduser();
					return(1);

				case POP3C_PASSWORD_SENT:
					pop3c_sendpassword();
					return(1);

				case POP3C_STAT_SENT:
					pop3c_sendstat();
					return(1);

				case POP3C_LIST_SENT:
					pop3c_sendlist(pop3_client.curmsgindex);
					return(1);

				case POP3C_TOP0_SENT:
					pop3c_sendtop(0);
					return(1);

				case POP3C_RETR_SENT:
					pop3c_sendretr(pop3_client.curmsgindex);
					return(1);

				case POP3C_DELE_SENT:
					pop3c_senddele(pop3_client.curmsgindex);
					return(1);

				case POP3C_QUIT_SENT:
					pop3c_sendquit();
					return(1);

				default:
					return(-1);
			}


			break;


		default:
			return(-1);
	}

	return(-1);

}


/********************************************************************************
Function:		pop3c_run

Parameters:		void

Return val:		void

Date:			11.9.2002

Desc:			This function should be called periodically from main loop
				in order to run pop3 client 'thread'.
*********************************************************************************/

void pop3c_run (void)
{
	INT16 i;

	/* On that function we can send data when called by main loop	*/

	if( pop3c_init_done == 0 )
		return;

	if( pop3_client.state < POP3C_OPEN_REQUESTED)
		return;

	/* Is there timeout of some sort?	*/

	if(check_timer(pop3_client.tmrhandle) == 0) {
		/* Yep	*/
		(void)tcp_abort(pop3_client.sochandle);
		pop3c_changestate(POP3C_CLOSED);

		/* Make user callback	*/
		pop3c_error();
		return;

	}

	if( pop3_client.state == POP3C_OPEN_REQUESTED) {
		/* We are on this state because user has requested connection	*/
		/* but connection is not yet opened.							*/
		/* Try to get TCP stack to accept our connection request		*/

		(void)tcp_abort(pop3_client.sochandle);		/* Release old connection	*/
		if(tcp_connect(pop3_client.sochandle, pop3_client.remip, pop3_client.remport, 0) >= 0)
			pop3c_changestate(POP3C_CONNECTIONOPEN_SENT);

		return;
	}

	if( tcp_getstate(pop3_client.sochandle) != TCP_STATE_CONNECTED ) {
		return;
	}

	if( tcp_checksend(pop3_client.sochandle) < 0 )
		return;

	/* It's connected and no unacked data so try to send	*/

	if(pop3_client.state == POP3C_SERVER_READY) {
		/* Send USER	*/
		pop3c_senduser();
		pop3c_changestate(POP3C_USERNAME_SENT);
		DEBUGOUT("POP3C USER packet sent\r\n");
		return;
	}

	if(pop3_client.state == POP3C_USERNAME_ACKED) {
		/* Send PASS	*/
		pop3c_sendpassword();
		pop3c_changestate(POP3C_PASSWORD_SENT);
		DEBUGOUT("POP3C PASS packet sent\r\n");
		return;
	}

	if(pop3_client.state == POP3C_PASSWORD_ACKED) {
		/* Send STAT	*/
		pop3c_sendstat();
		pop3c_changestate(POP3C_STAT_SENT);
		DEBUGOUT("POP3C STAT packet sent\r\n");
		return;
	}

	if(pop3_client.state == POP3C_STAT_GET) {
		/* Still messages?		*/
		if( pop3_client.curmsgindex < pop3_client.msgtotal ) {
			pop3_client.curmsgindex++;
			pop3c_sendlist(pop3_client.curmsgindex);
			pop3c_changestate(POP3C_LIST_SENT);
			DEBUGOUT("POP3C LIST packet sent\r\n");
			return;
		}

		/* End of messages	*/

		pop3c_sendquit();
		pop3c_changestate(POP3C_QUIT_SENT);
		DEBUGOUT("POP3C QUIT packet sent\r\n");
		return;

	}

	if(pop3_client.state == POP3C_LIST_GET) {
		/* Now we have the whole length of current message. Receive body	*/

		pop3c_sendtop(pop3_client.curmsgindex);
		pop3c_changestate(POP3C_TOP0_SENT);
		DEBUGOUT("POP3C TOP packet sent\r\n");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91精品精华液一区二区三区| 成人不卡免费av| 欧美一区二区不卡视频| 午夜精品在线视频一区| 欧美无乱码久久久免费午夜一区| 樱花影视一区二区| 欧洲另类一二三四区| 亚洲午夜精品在线| 欧美三级电影网站| 午夜日韩在线电影| 欧美另类高清zo欧美| 日韩高清欧美激情| 欧美成人女星排行榜| 老司机免费视频一区二区| 精品精品国产高清a毛片牛牛| 久久se精品一区精品二区| 精品国产一区久久| 国产精品一区二区久久精品爱涩| 国产欧美一区在线| 9久草视频在线视频精品| 亚洲日本中文字幕区| 色婷婷av一区二区| 亚洲狠狠爱一区二区三区| 欧美日韩不卡一区二区| 蜜桃精品在线观看| 久久久99精品免费观看不卡| 高清不卡一二三区| 《视频一区视频二区| 欧美做爰猛烈大尺度电影无法无天| 亚洲国产成人av网| 欧美变态tickling挠脚心| 国产精品亚洲视频| 亚洲日本一区二区| 欧美老女人第四色| 国产一区999| 自拍偷拍亚洲欧美日韩| 欧美日韩精品系列| 久久精品国产色蜜蜜麻豆| 欧美激情中文不卡| 在线中文字幕不卡| 六月丁香综合在线视频| 欧美国产精品一区二区| 在线亚洲高清视频| 久久精品999| ●精品国产综合乱码久久久久| 欧美色欧美亚洲另类二区| 美洲天堂一区二卡三卡四卡视频 | 欧美精品免费视频| 狠狠色丁香婷婷综合| 最近中文字幕一区二区三区| 欧美日韩mp4| 国产精品911| 亚洲午夜久久久久久久久久久| 欧美一级日韩不卡播放免费| 国产91精品一区二区麻豆网站 | 免费一级片91| 国产精品国产自产拍在线| 国产精品蜜臀在线观看| 欧美色精品在线视频| 国产精品综合二区| 一区二区日韩电影| 26uuu欧美| 欧洲精品一区二区| 国产精品一区二区果冻传媒| 亚洲图片欧美综合| 国产日产亚洲精品系列| 欧美精品在线观看一区二区| 成人中文字幕电影| 日韩高清不卡一区| 亚洲品质自拍视频| 久久综合999| 欧美日韩中字一区| 成+人+亚洲+综合天堂| 麻豆成人91精品二区三区| 亚洲精品日韩一| 国产性色一区二区| 欧美一区二区人人喊爽| 97久久久精品综合88久久| 国产综合久久久久久鬼色| 亚洲国产成人av| 最新久久zyz资源站| 2020日本不卡一区二区视频| 在线观看国产一区二区| 成人久久18免费网站麻豆| 久久se精品一区精品二区| 亚洲自拍偷拍欧美| 国产精品乱子久久久久| 337p日本欧洲亚洲大胆色噜噜| 欧美日韩色综合| 91香蕉视频污| 成人午夜大片免费观看| 久草中文综合在线| 午夜影院久久久| 亚洲男人电影天堂| 国产精品视频yy9299一区| 久久综合给合久久狠狠狠97色69| 在线不卡欧美精品一区二区三区| 色av一区二区| 99久久er热在这里只有精品15| 国产盗摄女厕一区二区三区| 美女性感视频久久| 日韩激情中文字幕| 亚洲成人av免费| 亚洲精品老司机| 中文字幕一区二区三区色视频| 久久久精品免费观看| 欧美成人三级在线| 日韩一级高清毛片| 欧美日韩日日骚| 欧美在线一二三| 91黄视频在线| 色婷婷综合五月| 91麻豆自制传媒国产之光| 成人app软件下载大全免费| 国产成人精品影视| 国产99久久精品| 国产精品88av| 国产91精品露脸国语对白| 国产精品一区二区三区99| 国产乱码一区二区三区| 国产在线视频一区二区三区| 经典三级视频一区| 精品无人码麻豆乱码1区2区 | 亚洲国产精品久久一线不卡| 一区二区三区.www| 亚洲国产视频直播| 亚洲午夜久久久久久久久电影院 | 中文子幕无线码一区tr| 亚洲国产高清在线观看视频| 亚洲国产精品ⅴa在线观看| 国产女同互慰高潮91漫画| 国产日产精品一区| 国产精品色眯眯| 日韩理论电影院| 尤物av一区二区| 亚洲成人av福利| 奇米亚洲午夜久久精品| 男人操女人的视频在线观看欧美| 美腿丝袜一区二区三区| 国产主播一区二区| 顶级嫩模精品视频在线看| 99亚偷拍自图区亚洲| 91麻豆视频网站| 欧美日韩亚洲国产综合| 日韩一区二区三区在线视频| 精品成a人在线观看| 国产日韩欧美激情| 亚洲婷婷国产精品电影人久久| 亚洲一区二区在线播放相泽| 丝袜国产日韩另类美女| 美女视频一区二区三区| 国产剧情一区在线| 91在线视频18| 欧美亚洲综合网| 在线综合亚洲欧美在线视频| 26uuu久久天堂性欧美| 中文字幕不卡的av| 亚洲一区在线电影| 美女精品一区二区| 成人免费视频播放| 色av一区二区| 日韩欧美另类在线| 国产精品福利av| 午夜精品免费在线| 国产精一品亚洲二区在线视频| 99久久精品一区| 欧美猛男gaygay网站| 精品国产凹凸成av人导航| 国产精品灌醉下药二区| 天堂在线一区二区| 国产黄色91视频| 欧洲色大大久久| 337p粉嫩大胆噜噜噜噜噜91av| 中文字幕亚洲电影| 日韩精品国产欧美| 成人中文字幕电影| 欧美电影影音先锋| 国产精品―色哟哟| 日韩电影免费在线看| 成人在线一区二区三区| 欧美日韩成人综合| 久久精品综合网| 亚洲一区二区3| 国产精品系列在线观看| 欧美少妇一区二区| 国产欧美精品一区二区三区四区| 亚洲国产日韩综合久久精品| 国产精品18久久久久| 欧美性猛片xxxx免费看久爱| 久久久九九九九| 亚洲sss视频在线视频| 成熟亚洲日本毛茸茸凸凹| 制服丝袜中文字幕亚洲| 国产精品嫩草影院com| 蜜臀av一级做a爰片久久| 99久久精品国产毛片| 精品久久久久久久久久久院品网| 亚洲精品少妇30p| 国产精品主播直播| 欧美一区中文字幕|