From: nishi Date: Thu, 15 Feb 2024 01:33:11 +0000 (+0000) Subject: fix X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=5de1bf5ff1959b3422fd1742f747d0608f9ef0b4;p=libw3.git fix git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@221 d27a3e52-49c5-7645-884c-6793ebffc270 --- diff --git a/Example/nntp-list/nntp-list.c b/Example/nntp-list/nntp-list.c index 7fd4acf..b174463 100644 --- a/Example/nntp-list/nntp-list.c +++ b/Example/nntp-list/nntp-list.c @@ -40,7 +40,7 @@ int main(int argc, char** argv) { w3url = W3_Parse_URL(argv[1]); if(w3url != NULL) { struct W3* w3 = W3_Create("nntp", w3url->host, w3url->port); - W3_On(w3, "ftpresp", resp_handler); + W3_On(w3, "nntpresp", resp_handler); W3_On(w3, "data", data_handler); W3_Send_Request(w3); W3_Free_URL(w3url); diff --git a/Library/NNTP.c b/Library/NNTP.c index e97e801..5304e5c 100644 --- a/Library/NNTP.c +++ b/Library/NNTP.c @@ -10,4 +10,12 @@ extern int strcasecmp(const char* s1, const char* s2); -void __W3_NNTP_Request(struct W3* w3) { __W3_Debug("LibW3-NNTP", "Sending the request"); } +void __W3_NNTP_Request(struct W3* w3) { + __W3_Debug("LibW3-NNTP", "Sending the request"); + char* buf = malloc(w3->readsize); + while(true) { + int len = __W3_Auto_Read(w3, buf, w3->readsize); + if(len <= 0) break; + } + free(buf); +} diff --git a/W3Version.h.p b/W3Version.h.p index 0b0ff38..2b9c580 100644 --- a/W3Version.h.p +++ b/W3Version.h.p @@ -6,7 +6,7 @@ extern "C" { #endif -#define LIBW3_VERSION "2.12D" \ +#define LIBW3_VERSION "2.12E" \ SUFFIX #ifdef __cplusplus