-
/*
* CUnit - A Unit testing framework library for C.
* Copyright (C) 2001 Anil Kumar
*
- * This library is free software; you can redistribute it and/or
+ * This library is open source software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdio.h>
{
int ssock;
int i = 0;
- int fail_this_transaction = 0;
int ret;
struct timeval tv;
fd_set readset, tempset;
do {
/* Only one thread can accept at a time */
- fail_this_transaction = 0;
ssock = -1;
errno = EAGAIN;
do {
Blob = NewStrBuf();
Line = NewStrBuf();
- for (i = 0; (i == 0) || (StrLength(Line) != 0); i++) {
+ for (i = 0; 1; i++) {
StrBufTCP_read_buffered_line_fast(Line,
ReadBuffer,
&Pos,
sizeof("Content-Length:"));
}
+ if (StrLength(Line) == 0)
+ break;
FlushStrBuf(Line);
}
TestRevalidateStrBuf(Blob);
if (err != NULL)
printf("%s", err);
+ printf("Blob said/read: %d / %d\n", blobsize, StrLength(Blob));
CU_ASSERT(blobsize != 0);
CU_ASSERT(blobsize == StrLength(Blob));
CU_ASSERT_PTR_NULL(err);
// else run the simple http test
break;
case 't':
- timeout = atoi(optarg);
+ if (optarg != NULL)
+ timeout = atoi(optarg);
break;
case 's':
- selres = atoi(optarg);
+ if (optarg != NULL)
+ selres = atoi(optarg);
break;
}
}
- StartLibCitadel(8);
CU_BOOL Run = CU_FALSE ;
CU_set_output_filename("TestAutomated");