Skip to content

Commit

Permalink
Kludge to keep IGnus from barfing on queues with fewer than 10 items …
Browse files Browse the repository at this point in the history
…if a queue has already been digested.
  • Loading branch information
vogon committed Oct 24, 2002
1 parent 3efeba4 commit d521c22
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libinews/net.c
Expand Up @@ -328,6 +328,7 @@ ArticleInfo **INEWS_digest(int offset, int n) {
}

retval = (ArticleInfo **)malloc(n * sizeof(ArticleInfo *));
memset(retval, 0, sizeof(retval));

/* iterate through the cache, and set the offset to the lowest-numbered
* cached item. assume that the items are listed in descending order of
Expand Down Expand Up @@ -447,6 +448,7 @@ ArticleInfo **INEWS_digest(int offset, int n) {
/* if we hit a premature end-of-record, then we'll need to shrink down our
* return to prevent problems when we try to free it */
retval = (ArticleInfo **)realloc(retval, (count * sizeof(ArticleInfo *)));
retval[count] = NULL;

goto end_success;

Expand Down Expand Up @@ -558,8 +560,6 @@ Sint8 INEWS_changeApprovalStatus(Uint32 aid, bool approve) {

artinfo = INEWS_digest(aid + 1, 1);

printf("artinfo[0] is %x\n", artinfo[0]);

if (artinfo[0]->approved == approve) {
INEWS_freeDigest(artinfo);
goto end_success;
Expand Down Expand Up @@ -636,8 +636,6 @@ Sint8 INEWS_changeDeletionStatus(Uint32 aid, bool deleteflag) {

artinfo = INEWS_digest(aid + 1, 1);

printf("artinfo[0] is %x\n", artinfo);

if (artinfo[0]->deleted == deleteflag) {
INEWS_freeDigest(artinfo);
goto end_success;
Expand Down

0 comments on commit d521c22

Please sign in to comment.