-AUX wmpop3lb-2.4.2-socket-close.patch 755 RMD160 c3a1d78d6b42df5c417b293e0e0960dd79d3575a SHA1 e22fbf542b06f355cc56bca9ada1f17a7f869558 SHA256 3a3bcbe704b3d98f9014ea609314824601acca598523cd7fb946964c8ec40ac5 size 755
+AUX wmpop3lb-2.4.2-fix-RECV-and-try-STAT-if-LAST-wont-work.patch 5673 RMD160 3465aa4a192923d56ddb3946aa755e0db7ab2ee6 SHA1 48adbcae00997c1697bf8a16fc6a77d172d013d3 SHA256 ae7a6fcd16b4bf5584104de6241d54dedec43f8a81aa20737d40a1a2217c2e3b
+MD5 cce08a905ff7d4bf1cfad4f6ffa61a8c files/wmpop3lb-2.4.2-fix-RECV-and-try-STAT-if-LAST-wont-work.patch 5673
+RMD160 3465aa4a192923d56ddb3946aa755e0db7ab2ee6 files/wmpop3lb-2.4.2-fix-RECV-and-try-STAT-if-LAST-wont-work.patch 5673
+SHA256 ae7a6fcd16b4bf5584104de6241d54dedec43f8a81aa20737d40a1a2217c2e3b files/wmpop3lb-2.4.2-fix-RECV-and-try-STAT-if-LAST-wont-work.patch 5673
+AUX wmpop3lb-2.4.2-socket-close.patch 755 RMD160 c3a1d78d6b42df5c417b293e0e0960dd79d3575a SHA1 e22fbf542b06f355cc56bca9ada1f17a7f869558 SHA256 3a3bcbe704b3d98f9014ea609314824601acca598523cd7fb946964c8ec40ac5
MD5 04298a683e583765f0071831ef43944f files/wmpop3lb-2.4.2-socket-close.patch 755
RMD160 c3a1d78d6b42df5c417b293e0e0960dd79d3575a files/wmpop3lb-2.4.2-socket-close.patch 755
SHA256 3a3bcbe704b3d98f9014ea609314824601acca598523cd7fb946964c8ec40ac5 files/wmpop3lb-2.4.2-socket-close.patch 755
-DIST wmpop3lb2.4.2.tar.gz 37391 RMD160 9625131b5284258d751089d9a9e1e11a62650eb9 SHA256 209b5ca409f226032b1200779e09f3d45a3522bc08eeb9f1b63e14bd04e780f3 size 37391
-EBUILD wmpop3lb-2.4.2-r1.ebuild 953 RMD160 66c51b4d9c34c0010a389255a37b64c0cf2775e8 SHA1 ac455d316d05f6299ad621b47c1433b540f00dde SHA256 6bccb4b63cb657109e1721c3c28a4926eefc4adec966589a0987950b53e17854 size 953
+DIST wmpop3lb2.4.2.tar.gz 37391 RMD160 9625131b5284258d751089d9a9e1e11a62650eb9 SHA1 a093b00285fa75990914f9b8c02ea203e8ed41b6 SHA256 209b5ca409f226032b1200779e09f3d45a3522bc08eeb9f1b63e14bd04e780f3
+EBUILD wmpop3lb-2.4.2-r1.ebuild 953 RMD160 66c51b4d9c34c0010a389255a37b64c0cf2775e8 SHA1 ac455d316d05f6299ad621b47c1433b540f00dde SHA256 6bccb4b63cb657109e1721c3c28a4926eefc4adec966589a0987950b53e17854
MD5 bb2c6abae4a6e74eb5413f348724953b wmpop3lb-2.4.2-r1.ebuild 953
RMD160 66c51b4d9c34c0010a389255a37b64c0cf2775e8 wmpop3lb-2.4.2-r1.ebuild 953
SHA256 6bccb4b63cb657109e1721c3c28a4926eefc4adec966589a0987950b53e17854 wmpop3lb-2.4.2-r1.ebuild 953
-EBUILD wmpop3lb-2.4.2.ebuild 866 RMD160 2a8daabf560a7588c337bbbdbcf11645d9c94262 SHA1 e741228166fdcb8768ec58e53393edc23c7cacc6 SHA256 e33e37466751c4a2e626513b95190f4d0faffe926a7320f13ffdfaddbcade63b size 866
+EBUILD wmpop3lb-2.4.2-r2.ebuild 1093 RMD160 065ad8d4c2cc2bf540594991fd63f3c7a09b7a29 SHA1 00bdb96164de9d90e711f65a7d6246d0df3aa7b4 SHA256 b5a7103c948e18180ed0b62c78d69cd1d8af0fb056f1471f27fb5abd1d153969
+MD5 b55ce2585901be2e81e36e2bf5449614 wmpop3lb-2.4.2-r2.ebuild 1093
+RMD160 065ad8d4c2cc2bf540594991fd63f3c7a09b7a29 wmpop3lb-2.4.2-r2.ebuild 1093
+SHA256 b5a7103c948e18180ed0b62c78d69cd1d8af0fb056f1471f27fb5abd1d153969 wmpop3lb-2.4.2-r2.ebuild 1093
+EBUILD wmpop3lb-2.4.2.ebuild 866 RMD160 2a8daabf560a7588c337bbbdbcf11645d9c94262 SHA1 e741228166fdcb8768ec58e53393edc23c7cacc6 SHA256 e33e37466751c4a2e626513b95190f4d0faffe926a7320f13ffdfaddbcade63b
MD5 03652de77bcf41f9648d8ed4031c0ea2 wmpop3lb-2.4.2.ebuild 866
RMD160 2a8daabf560a7588c337bbbdbcf11645d9c94262 wmpop3lb-2.4.2.ebuild 866
SHA256 e33e37466751c4a2e626513b95190f4d0faffe926a7320f13ffdfaddbcade63b wmpop3lb-2.4.2.ebuild 866
-MISC ChangeLog 1082 RMD160 fadbb2fece33cc7efdac96c82da3a2c36e0b9a8b SHA1 c7347fa3a435f52edd4ff9ced3316b87c9e29eaf SHA256 7c0fb8e3f512815e132b3a7e3fb9dfb30b63de43f43e30ccc5284a274dbcad58 size 1082
-MD5 8681aac7c4af449ddb9d34aee43ae969 ChangeLog 1082
-RMD160 fadbb2fece33cc7efdac96c82da3a2c36e0b9a8b ChangeLog 1082
-SHA256 7c0fb8e3f512815e132b3a7e3fb9dfb30b63de43f43e30ccc5284a274dbcad58 ChangeLog 1082
-MISC metadata.xml 165 RMD160 a554e96dc33b1fb4b3518f27a21bf3f59dc21b1c SHA1 674655a4f0fc35c7b3b2e05aab1910c0ebafade1 SHA256 c2f8a0b30c83dba56f0c36a4ba1cb002621ae58dfc13fae94b9db6eb67fb9f1b size 165
+MISC ChangeLog 1245 RMD160 eec176f54168e90f22b2be3d8b194c0ea943c56b SHA1 7e141988fbdcb16e0978b1e848bf0c73b27b7f00 SHA256 2789fd2d36a5755512f6df2707ee8af8745f0ae7ed15e4e9254d9fa5309d14e7
+MD5 a84cb4760fd31cd17c5df6bce16bb89d ChangeLog 1245
+RMD160 eec176f54168e90f22b2be3d8b194c0ea943c56b ChangeLog 1245
+SHA256 2789fd2d36a5755512f6df2707ee8af8745f0ae7ed15e4e9254d9fa5309d14e7 ChangeLog 1245
+MISC metadata.xml 165 RMD160 a554e96dc33b1fb4b3518f27a21bf3f59dc21b1c SHA1 674655a4f0fc35c7b3b2e05aab1910c0ebafade1 SHA256 c2f8a0b30c83dba56f0c36a4ba1cb002621ae58dfc13fae94b9db6eb67fb9f1b
MD5 62ba71d3b2fa785a4cbd5d47fdbd0eb6 metadata.xml 165
RMD160 a554e96dc33b1fb4b3518f27a21bf3f59dc21b1c metadata.xml 165
SHA256 c2f8a0b30c83dba56f0c36a4ba1cb002621ae58dfc13fae94b9db6eb67fb9f1b metadata.xml 165
MD5 2e51ee1e7173b85a6ee356eef4a48cf2 files/digest-wmpop3lb-2.4.2-r1 238
RMD160 89aafd22ad69be6b16612c41a2535477929c3591 files/digest-wmpop3lb-2.4.2-r1 238
SHA256 34c795b84cfe24d2ebdb79528062adc363bff8842490bd380e616aa6ebba4644 files/digest-wmpop3lb-2.4.2-r1 238
+MD5 2e51ee1e7173b85a6ee356eef4a48cf2 files/digest-wmpop3lb-2.4.2-r2 238
+RMD160 89aafd22ad69be6b16612c41a2535477929c3591 files/digest-wmpop3lb-2.4.2-r2 238
+SHA256 34c795b84cfe24d2ebdb79528062adc363bff8842490bd380e616aa6ebba4644 files/digest-wmpop3lb-2.4.2-r2 238
--- /dev/null
+--- wmpop3lb2.4.2/wmpop3/Pop3Client.c 2002-06-27 16:04:42.000000000 +0200
++++ wmpop3lb2.4.2-pathed/wmpop3/Pop3Client.c 2007-01-11 14:39:12.000000000 +0200
+@@ -27,6 +27,49 @@
+
+ #include "Pop3Client.h"
+
++/* receive full responce */
++int do_recv(int s, void *ibuf, size_t len, int flags)
++{
++ size_t ret, total;
++ char *p, *buf = ibuf;
++
++ total = 0;
++ while (1)
++ {
++ /* left one byte for null termination */
++ ret = recv(s, buf + total, len - 1 - total, flags);
++ /* if we got error or close, then brea */
++ if (ret <= 0)
++ {
++ break;
++ }
++ /* increase size of received data */
++ total += ret;
++ /* null terminating received data */
++ buf[total] = 0;
++ /* left one byte for null termination
++ * if out of buffer, return */
++ if (len - total <= 1)
++ {
++ break;
++ }
++ /* if we found end of line signal, then stop */
++ p = strstr(buf, "\r\n");
++ printf("p == %p\n", p);
++ if (p != 0)
++ {
++ break;
++ }
++ }
++
++ /* if there wasn't any data, then return error code */
++ if (total == 0)
++ {
++ return ret;
++ }
++ return total;
++}
++
+ /* return size if all goes well, -1 if not expected answer */
+ int send_command(char *exp_answer, char **retour, Pop3 pc)
+ {
+@@ -61,18 +104,29 @@
+ return (pc);
+ }
+ int pop3MakeConnection(Pop3 pc, char *serverName, int port){
++ struct timeval t;
+
+ pc->s = socket(AF_INET, SOCK_STREAM, 0 );
+ memset( &(pc->server), 0 , sizeof(pc->server));
+ pc->server.sin_family = AF_INET;
+ pc->hp = gethostbyname(serverName);
+ if( pc->hp == 0)
++ {
++ close(pc->s);
+ return -1;
++ }
+ memcpy( &(pc->server.sin_addr), pc->hp->h_addr, pc->hp->h_length);
+ pc->server.sin_port = htons(port);
+ if ( connect(pc->s, (struct sockaddr *)&(pc->server)
+ , sizeof(pc->server)) < 0 )
++ {
++ close(pc->s);
+ return -1;
++ }
++ t.tv_sec = 60;
++ t.tv_usec = 0;
++ setsockopt(pc->s, SOL_SOCKET, SO_RCVTIMEO, &t, sizeof(t));
++ setsockopt(pc->s, SOL_SOCKET, SO_SNDTIMEO, &t, sizeof(t));
+ pc->connected = CONNECTED;
+ return 0;
+ }
+@@ -94,7 +148,7 @@
+ return -1;
+ }
+
+- size = recv(pc->s,&pc->inBuf,1024,0);
++ size = do_recv(pc->s,&pc->inBuf,1024,0);
+ memset(temp,0,1024);
+ memcpy(temp,pc->inBuf,size);
+ if( temp[0] != '+' ){
+@@ -104,10 +158,10 @@
+
+ sprintf(pc->outBuf,"USER %s\r\n",name);
+ send(pc->s, &pc->outBuf,strlen(pc->outBuf),0);
+- size =recv(pc->s,pc->inBuf,1024,0);
++ size = do_recv(pc->s,pc->inBuf,1024,0);
+ memset(temp,0,1024);
+ memcpy(temp,pc->inBuf,size);
+- if( temp[0] != '+' ){
++ if( temp[0] != '+' && temp[0] != '\r' ){
+ fprintf(stderr,"Invalid User Name\n");
+ return -1;
+ }
+@@ -115,10 +169,10 @@
+ memset(pc->outBuf,0,1024);
+ sprintf(pc->outBuf,"PASS %s\r\n",pass);
+ send(pc->s, pc->outBuf, strlen(pc->outBuf),0 );
+- size =recv(pc->s,&pc->inBuf,1024,0);
++ size = do_recv(pc->s,&pc->inBuf,1024,0);
+ memset(temp,0,1024);
+ memcpy(temp,pc->inBuf,size);
+- if( temp[0] != '+' ){
++ if( temp[0] != '+' && temp[0] != '\r'){
+ fprintf(stderr,"Incorrect Password\n");
+ return -1;
+ }
+@@ -213,7 +267,7 @@
+ /* Find total number of messages in mail box */
+ sprintf(pc->outBuf,"STAT\r\n");
+ send(pc->s, pc->outBuf, strlen(pc->outBuf),0 );
+- size = recv(pc->s,pc->inBuf,1024,0);
++ size = do_recv(pc->s,pc->inBuf,1024,0);
+ if( pc->inBuf[0] != '+' ){
+ perror("Error Receiving Stats");
+ return (-1);
+@@ -266,7 +320,7 @@
+ /* Find total number of messages in mail box */
+ sprintf(pc->outBuf,"STAT\r\n");
+ send(pc->s, pc->outBuf, strlen(pc->outBuf),0 );
+- size = recv(pc->s,pc->inBuf,1024,0);
++ size = do_recv(pc->s,pc->inBuf,1024,0);
+ pc->inBuf[size] = '\0';
+ #ifdef _DEBUG
+ printf(" pop3CheckMail, stat received buf (size=%d): [%s]\n",
+@@ -313,7 +367,7 @@
+
+ sprintf(pc->outBuf,"LAST\r\n");
+ send(pc->s, pc->outBuf, strlen(pc->outBuf),0 );
+- size = recv(pc->s,pc->inBuf,1024,0);
++ size = do_recv(pc->s,pc->inBuf,1024,0);
+ pc->inBuf[size] = '\0';
+ #ifdef _DEBUG
+ printf(" pop3CheckMail, last received buf (size=%d): [%s]\n",
+@@ -325,9 +379,25 @@
+ #ifdef _DEBUG
+ printf(" Error Receiving LAST: [%s]\n", temp);
+ #endif
+- pc->numOfUnreadMessages = pc->numOfMessages;
++ /* TRY STAT instead LAST */
++ sprintf(pc->outBuf,"STAT\r\n");
++ send(pc->s, pc->outBuf, strlen(pc->outBuf),0 );
++ size = do_recv(pc->s,pc->inBuf,1024,0);
++ pc->inBuf[size] = '\0';
++#ifdef _DEBUG
++ printf(" pop3CheckMail, last received buf (size=%d): [%s]\n",
++ size, pc->inBuf);
++#endif
++ memset(temp,0,1024);
++ memcpy(temp,pc->inBuf,size);
++ if( temp[0] != '+' ){
++#ifdef _DEBUG
++ printf(" Error Receiving STAT: [%s]\n", temp);
++#endif
++ pc->numOfUnreadMessages = pc->numOfMessages;
++ }
+ }
+- else {
++ if( temp[0] != '+' ){
+ ptr = strtok(temp, " ");
+ ptr = strtok( 0," ");
+ pc->numOfUnreadMessages = pc->numOfMessages - atoi(ptr);
+@@ -545,7 +615,7 @@
+ printf(" %s\n", pc->outBuf);
+ #endif
+ send(pc->s, pc->outBuf, strlen(pc->outBuf), 0);
+- size = recv(pc->s, pc->inBuf, 4096, 0);
++ size = do_recv(pc->s, pc->inBuf, 4096, 0);
+ if ('+' != pc->inBuf[0]) {
+ perror("error while deleting mail");
+ return (1);
+@@ -579,7 +649,7 @@
+ if( pc->connected == NOT_CONNECTED )
+ return -1;
+ send(pc->s, "quit\r\n", 6,0 );
+- size =recv(pc->s,&pc->inBuf,1024,0);
++ size = do_recv(pc->s,&pc->inBuf,1024,0);
+ pc->connected = NOT_CONNECTED;
+ if(pc->s != 0)
+ close(pc->s);