]> Nishi Git Mirror - libw3.git/commitdiff
fixed bug
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Sat, 27 Jan 2024 13:53:00 +0000 (13:53 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Sat, 27 Jan 2024 13:53:00 +0000 (13:53 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@120 d27a3e52-49c5-7645-884c-6793ebffc270

Example/pop3-list/pop3-list.c
Library/POP3.c

index 0a35b12f49576725a60f309c74ae89ae1eebd645..d94910a95e2eb5f2423591de949f8ffd752893b8 100644 (file)
@@ -23,8 +23,7 @@ void finish_handler(struct W3* w3) { W3_POP3_Disconnect(w3); }
 
 void login_handler(struct W3* w3) {
        printf("Logged in\n");
-       W3_Set_Method(w3, "RETR");
-       W3_Set_Path(w3, "98");
+       W3_Set_Method(w3, "LIST");
        W3_POP3_Send_Request(w3);
 }
 
index 684a9db59819a0536cfe5fd5f023f3d9b44afdc2..895927c4e2ee828915855992dd75262ec4fdd0eb 100644 (file)
@@ -132,6 +132,11 @@ void __W3_POP3_Request(struct W3* w3) {
                                                                void (*func)(struct W3*, bool, char*) = (void (*)(struct W3*, bool, char*))funcptr;
                                                                func(w3, true, message);
                                                        }
+                                                       funcptr = __W3_Get_Event(w3, "pop3finish");
+                                                       if(funcptr != NULL) {
+                                                               void (*func)(struct W3*) = (void (*)(struct W3*))funcptr;
+                                                               func(w3);
+                                                       }
                                                }
                                        } else if(phase == 4) {
                                                /* ERR */
@@ -151,6 +156,11 @@ void __W3_POP3_Request(struct W3* w3) {
                                                                void (*func)(struct W3*, bool, char*) = (void (*)(struct W3*, bool, char*))funcptr;
                                                                func(w3, false, message);
                                                        }
+                                                       funcptr = __W3_Get_Event(w3, "pop3finish");
+                                                       if(funcptr != NULL) {
+                                                               void (*func)(struct W3*) = (void (*)(struct W3*))funcptr;
+                                                               func(w3);
+                                                       }
                                                }
                                        }
                                }