From: nishi Date: Thu, 15 Feb 2024 05:30:46 +0000 (+0000) Subject: nntp-list X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=317ef847302fba0c1bd135411720fe7da991a5f3;p=libw3.git nntp-list git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@224 d27a3e52-49c5-7645-884c-6793ebffc270 --- diff --git a/Example/nntp-list/nntp-list.c b/Example/nntp-list/nntp-list.c index 9bcc035..7d2892f 100644 --- a/Example/nntp-list/nntp-list.c +++ b/Example/nntp-list/nntp-list.c @@ -28,13 +28,16 @@ void resp_handler(struct W3* w3, int status, char* data) { W3_Set_Method(w3, "GROUP"); W3_Set_Path(w3, w3url->path + 1); W3_NNTP_Send_Request(w3); - }else if(status == 211){ + }else if(status == 211 || status == 223){ W3_Set_Method(w3, "HEAD"); W3_NNTP_Send_Request(w3); }else if(status == 221){ W3_Set_Method(w3, "BODY"); W3_NNTP_Send_Request(w3); }else if(status == 222){ + W3_Set_Method(w3, "NEXT"); + W3_NNTP_Send_Request(w3); + }else{ W3_NNTP_Disconnect(w3); } } diff --git a/Library/NNTP.c b/Library/NNTP.c index e5a6b68..8eb184f 100644 --- a/Library/NNTP.c +++ b/Library/NNTP.c @@ -98,6 +98,8 @@ void W3_NNTP_Send_Request(struct W3* w3){ }else if(strcasecmp(w3->method, "BODY") == 0){ (*(int*)w3->generic) |= 1; __W3_Auto_Write(w3, "BODY\r\n", 6); + }else if(strcasecmp(w3->method, "NEXT") == 0){ + __W3_Auto_Write(w3, "NEXT\r\n", 6); }else if(strcasecmp(w3->method, "GROUP") == 0){ __W3_Auto_Write(w3, "GROUP ", 6); __W3_Auto_Write(w3, w3->path, strlen(w3->path)); diff --git a/W3Version.h.p b/W3Version.h.p index 2862178..2a89c8f 100644 --- a/W3Version.h.p +++ b/W3Version.h.p @@ -6,7 +6,7 @@ extern "C" { #endif -#define LIBW3_VERSION "2.12G" \ +#define LIBW3_VERSION "2.12H" \ SUFFIX #ifdef __cplusplus