]> Nishi Git Mirror - libw3.git/commitdiff
pop3
authornishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Sat, 27 Jan 2024 01:28:06 +0000 (01:28 +0000)
committernishi <nishi@d27a3e52-49c5-7645-884c-6793ebffc270>
Sat, 27 Jan 2024 01:28:06 +0000 (01:28 +0000)
git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@103 d27a3e52-49c5-7645-884c-6793ebffc270

Library/POP3.c

index ee691ff2059b557a6bf0375a92197871b70d49e3..ff5c9ae3ddfbf441b3857e6509a68fb586375892 100644 (file)
 void __W3_POP3_Request(struct W3* w3) {
        if(__W3_Get_Prop(w3, "POP3_USERNAME") == NULL || __W3_Get_Prop(w3, "POP3_PASSWORD") == NULL){
                __W3_Debug("LibW3-POP3", "Set the username/password");
+               void* funcptr = __W3_Get_Event(w3, "error");
+               if(funcptr != NULL){
+                       void(*func)(struct W3*, const char*) = (void(*)(struct W3*, const char*))funcptr;
+                       func(w3, "did-not-auth");
+               }
                return;
        }
        char* buf = malloc(w3->readsize);
@@ -41,6 +46,7 @@ void __W3_POP3_Request(struct W3* w3) {
                                                if(login == 2){
                                                        /* Login success */
                                                        login = 3;
+                                                       __W3_Debug("LibW3-POP3", "Login successful");
                                                }else{
                                                }
                                        }else if(phase == 4){