Hello Joe, Wednesday, January 31, 2007, 1:26:14 PM, you wrote: > Could you try a patch like this: ...sip... > and if that has no effect, try doing the same thing in the write_raw() > function instead. Thanks!!! Putting the similar limitation into the "write_raw()" fixed the "large_writes" test. You've said "instead", should I read it literally - it is supposed to be *EITHER* in the "write_raw()" *OR* in the "read_raw()"?
> A difference with the SSL test is probably that the actual read() and > write() calls made to the socket will use smaller buffers. Should I try searching for the maximum allowed instead of 8192 bytes? Now all the tests report 100% passage (excluding the UTF-8 in the "./test/ssl"). Still I get some intervening comments popping up in the "./test/auth", "./test/compress" and the warning in the "./test/socket" (see below). Is my library of a "production quality"? The full unified diff is also included below. Thank you for the nice job! -- Best regards, Anthony mailto:[EMAIL PROTECTED] diff -ru neon-0.26.3-distrib/src/ne_dates.c neon-0.26.3/src/ne_dates.c --- neon-0.26.3-distrib/src/ne_dates.c 2006-05-24 00:27:37.000000000 +0400 +++ neon-0.26.3/src/ne_dates.c 2007-01-30 19:05:37.000000000 +0300 @@ -72,8 +72,26 @@ #define GMTOFF(t) (gmt_to_local_win32()) #else /* FIXME: work out the offset anyway. */ +#ifdef __QNX__ +#define GMTOFF(t) gmtoff_qnx4(t) +#else /* __QNX__ */ #define GMTOFF(t) (0) #endif +#endif /* __QNX__ */ + +#ifdef __QNX__ +time_t gmtoff_qnx4(struct tm t) +{ + struct tm temporary_tm; + + memcpy(&temporary_tm, &t, sizeof(temporary_tm)); + (void)mktime(&temporary_tm); + if(temporary_tm.tm_isdst) + return(-timezone + 3600); + else + return(-timezone); +} +#endif #ifdef WIN32 time_t gmt_to_local_win32(void) diff -ru neon-0.26.3-distrib/src/ne_socket.c neon-0.26.3/src/ne_socket.c --- neon-0.26.3-distrib/src/ne_socket.c 2006-10-30 16:18:51.000000000 +0300 +++ neon-0.26.3/src/ne_socket.c 2007-01-31 17:51:08.000000000 +0300 @@ -467,6 +467,8 @@ ret = readable_raw(sock, sock->rdtimeout); if (ret) return ret; +/* if(len > 8192) len = 8192; This didn't fix the socket::large_writes */ + do { ret = recv(sock->fd, buffer, len, 0); } while (ret == -1 && NE_ISINTR(ne_errno)); @@ -490,6 +492,8 @@ { ssize_t ret; + if(length > 8192) length = 8192; /* Fix for the socket::large_writes */ + do { ret = send(sock->fd, data, length, 0); } while (ret == -1 && NE_ISINTR(ne_errno)); diff -ru neon-0.26.3-distrib/test/compress.c neon-0.26.3/test/compress.c --- neon-0.26.3-distrib/test/compress.c 2006-02-25 18:02:25.000000000 +0300 +++ neon-0.26.3/test/compress.c 2007-01-31 01:04:01.000000000 +0300 @@ -325,8 +325,17 @@ * a content-encoding, whereas the original 401 response did. */ static int retry_notcompress(void) { +#ifdef __QNX__ + struct string response; + struct string expect; + response.data = retry_gz_resp; + response.len = strlen(retry_gz_resp); + expect.data = "hello"; + expect.len = 5; +#else struct string response = { retry_gz_resp, strlen(retry_gz_resp) }; struct string expect = { "hello", 5 }; +#endif return retry_compress_helper(ne_accept_2xx, &response, &expect); } diff -ru neon-0.26.3-distrib/test/props.c neon-0.26.3/test/props.c --- neon-0.26.3-distrib/test/props.c 2006-02-27 20:28:34.000000000 +0300 +++ neon-0.26.3/test/props.c 2007-01-31 01:06:49.000000000 +0300 @@ -625,9 +625,18 @@ static int unbounded_response(const char *header, const char *repeats) { ne_session *sess; +#ifdef __QNX__ + struct infinite i; +#else struct infinite i = { header, repeats}; +#endif int dbg; +#ifdef __QNX__ + i.header = header; + i.repeat = repeats; +#endif + CALL(make_session(&sess, serve_infinite, &i)); dbg = ne_debug_mask; diff -ru neon-0.26.3-distrib/test/socket.c neon-0.26.3/test/socket.c --- neon-0.26.3-distrib/test/socket.c 2007-01-22 20:59:58.000000000 +0300 +++ neon-0.26.3/test/socket.c 2007-01-31 17:54:37.000000000 +0300 @@ -789,7 +789,7 @@ str.len = LARGE_SIZE; for (n = 0; n < LARGE_SIZE; n++) - str.data[n] = 41 + n % 130; + str.data[n] = 41 + n % 130; /* "33 + n % 143" is more fun here */ CALL(begin(&sock, serve_expect, &str)); CALL(full_write(sock, str.data, str.len)); diff -ru neon-0.26.3-distrib/test/ssl.c neon-0.26.3/test/ssl.c --- neon-0.26.3-distrib/test/ssl.c 2006-10-05 17:12:18.000000000 +0400 +++ neon-0.26.3/test/ssl.c 2007-01-31 18:25:37.000000000 +0300 @@ -348,7 +348,13 @@ static int accept_signed_cert_for_hostname(char *cert, const char *hostname) { ne_session *sess = ne_session_create("https", hostname, 7777); +#ifdef __QNX__ + struct ssl_server_args args; + memset(&args, 0, sizeof(args)); + args.cert = cert; +#else struct ssl_server_args args = {cert, 0}; +#endif /* no verify callback needed. */ CALL(any_ssl_request(sess, ssl_server, &args, CA_CERT, NULL, NULL)); ne_session_destroy(sess); @@ -1478,7 +1484,9 @@ T(cert_validity), T(cert_compare), T(dname_compare), +#ifndef __QNX__ /* Doomed to fail on QNX4 - no UTF-8 support */ T(dname_readable), +#endif T(import_export), T(read_write), ======================================== -> running `auth': 7. digest_failures....... server child failed: error reading line: Connection closed pass <- summary for `auth': of 9 tests run: 9 passed, 0 failed. 100.0% ======================================== -> running `compress': 8. fail_corrupt1......... server child failed: writing body pass 9. fail_corrupt2......... server child failed: writing body pass <- summary for `compress': of 21 tests run: 21 passed, 0 failed. 100.0% ========================================= -> running `socket': 28. write_reset........... WARNING: got EOF, failed to elicit TCP RST ...................... pass (with 1 warning) <- summary for `socket': of 35 tests run: 35 passed, 0 failed. 100.0% -> 1 warning was issued. _______________________________________________ neon mailing list [email protected] http://mailman.webdav.org/mailman/listinfo/neon
