From: nishi Date: Sat, 27 Jan 2024 13:53:00 +0000 (+0000) Subject: fixed bug X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=81b5c0f291f452ae83ed5391f2d2e7f2c670573e;p=libw3.git fixed bug git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@120 d27a3e52-49c5-7645-884c-6793ebffc270 --- diff --git a/Example/pop3-list/pop3-list.c b/Example/pop3-list/pop3-list.c index 0a35b12..d94910a 100644 --- a/Example/pop3-list/pop3-list.c +++ b/Example/pop3-list/pop3-list.c @@ -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); } diff --git a/Library/POP3.c b/Library/POP3.c index 684a9db..895927c 100644 --- a/Library/POP3.c +++ b/Library/POP3.c @@ -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); + } } } }