Re: [Libevent-users] [patch] more testcases

2011-10-20 Thread Leonid Evdokimov
On Thu, Oct 20, 2011 at 06:52, Nick Mathewson wrote: > On Wed, Oct 19, 2011 at 9:58 AM, Leonid Evdokimov wrote: > (The style tweak is that I generally do >  "struct foo *bar;" rather than "struct foo* bar;" Yep, I know that "*" applies to specific varia

Re: [Libevent-users] Re: [PATCH]: libevent/dns DNS_ERR_NOANSWERS

2011-10-19 Thread Leonid Evdokimov
One more cornercase - reply that has no answers at all should be treated as NODATA too. It is not malformed message. -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http://darkk.net.ru tel:+79816800702 && tel:+79050965222 From 1cd900a52536fb5294f6c13fa759730ea73574a6 Mon Sep

Re: [Libevent-users] [PATCH] disclose TTL for negative answers

2011-10-19 Thread Leonid Evdokimov
> Any chance of a unit test on this one? Better late then never :) -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http://darkk.net.ru tel:+79816800702 && tel:+79050965222 From 505d1539e0436355e82054a515d4fabdc6a20e85 Mon Sep 17 00:00:00 2001 From: Leonid Evdokimov Dat

[Libevent-users] [patch] more testcases

2011-10-19 Thread Leonid Evdokimov
sorry, I can't produce a nice fix right now, so I'm just sharing the testcase at this moment. :) And the last question: should I send further patches to ML or via github pull request? -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http://darkk.net.ru tel:+79816800702 &

Re: [Libevent-users] [PATCH] disclose TTL for negative answers

2011-09-01 Thread Leonid Evdokimov
On Thu, Sep 1, 2011 at 18:58, Nick Mathewson wrote: > Any chance of a unit test on this one? Sure. I'll try to grok tinytest this week. *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-users

Re: [Libevent-users] [PATCH] disclose TTL for negative answers

2011-09-01 Thread Leonid Evdokimov
ted OK message. "&" is binary "and", not logic "and". Logic "and" is "&&". So (flags & 0x020f == DNS_ERR_NOTEXIST) is true only for non-truncated answer with code 3 (NXDOMAIN) - that's the only error answer I want to parse lo

[Libevent-users] [PATCH] disclose TTL for negative answers

2011-09-01 Thread Leonid Evdokimov
RFC 2308 says a lot about negative answer caching. Here is patch, that discloses TTL of negative answer (if possible) to the library user. -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http://darkk.net.ru tel:+79816800702 && tel:+79050965222 From c903d9db417d2d8478eb7371

Re: [Libevent-users] Re: [PATCH]: libevent/dns DNS_ERR_NOANSWERS

2011-08-30 Thread Leonid Evdokimov
> There is an odd edge-case in dns. DNS_ERR_NOANSWER isn't actually a > great name. By the way, RFC 2308 (Negative Caching of DNS Queries (DNS NCACHE)) calls this case NODATA. Is DNS_ERR_NODATA better name from your point of view? -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net

[Libevent-users] [PATCH] Add Host header in HTTP/1.1 requests if it's missing.

2011-08-19 Thread Leonid Evdokimov
er manually - is required. -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http://darkk.net.ru tel:+79816800702 && tel:+79050965222 #include #include #include #include #include /* ugly :( */ #include #include void httpcb(struct evhttp_request *req,

Re: [Libevent-users] [PATCH] Fix possible memory leaks with debugging turned on.

2011-08-15 Thread Leonid Evdokimov
On Mon, Aug 15, 2011 at 19:26, Nick Mathewson wrote: >> Also, feel free to include evdns-example.c as sample of proper evdns >> cleanup if you find it useful. I think, that cleanup is not trivial. > > Hm. I'd like to have something about dns usage in the samples code, > but this one really only co

[Libevent-users] [PATCH] Fix possible memory leaks with debugging turned on.

2011-08-15 Thread Leonid Evdokimov
el free to include evdns-example.c as sample of proper evdns cleanup if you find it useful. I think, that cleanup is not trivial. -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http://darkk.net.ru tel:+79816800702 && tel:+79050965222 From 573b0ee284e19d2f399e67d58179252e2f8f716

[Libevent-users] [PATCH] Another docstring fix

2011-08-15 Thread Leonid Evdokimov
-- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http://darkk.net.ru tel:+79816800702 && tel:+79050965222 From 0bb4044523158b86ee12314d86ee4a3d39d29fd1 Mon Sep 17 00:00:00 2001 From: Leonid Evdokimov Date: Thu, 11 Aug 2011 03:06:07 +0400 Subject: [PATCH 3/5] Anoth

Re: [Libevent-users] Re: libevent http and lost requests

2011-08-15 Thread Leonid Evdokimov
On Fri, Aug 12, 2011 at 22:48, about bus wrote: > So, if everything ok with network, where libevent or maybe OS (FreeBSD 7.2) > holds request for 30 / 75 seconds? Do you use ACCEPT_FILTER in your http server? I think it can create such delay in case of some nasty bug. -- WBRBW, Leonid Evd

Re: [Libevent-users] libevent http and lost requests

2011-08-12 Thread Leonid Evdokimov
ith ab (apache benchmark) instead of nginx? -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http://darkk.net.ru tel:+79816800702 && tel:+79050965222 *** To unsubscribe, send an e-mail to majord...@freehaven

[Libevent-users] API question: struct evkeyval

2011-08-10 Thread Leonid Evdokimov
nternal or something like that in release 2.1 ? Another options is to introduce something simple like evkeyval_new / evkeyval_free in addition to evhttp_clear_headers. -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http://darkk.net.ru tel:+79816800702 &

Re: [Libevent-users] Re: [PATCH]: libevent/dns DNS_ERR_NOANSWERS

2011-08-10 Thread Leonid Evdokimov
On Wed, Aug 10, 2011 at 17:18, Mark Ellzey wrote: > On Wed, Aug 10, 2011 at 04:56:27PM +0400, Leonid Evdokimov wrote: >> +             } else if (reply && !reply->have_answer) { >> +                 error = DNS_ERR_NOANSWER; >> +             } else { >> +  

[Libevent-users] Re: [PATCH]: libevent/dns DNS_ERR_NOANSWERS

2011-08-10 Thread Leonid Evdokimov
I'm sorry, 0002-Add-DNS_ERR_….patch had no error description and had too much typos per line. Here is correct patch. -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http://darkk.net.ru tel:+79816800702 && tel:+79050965222 From eade47790a2ca423390565eee87bf69bd46ee1b1 Mon

[Libevent-users] [PATCH]: libevent/dns DNS_ERR_NOANSWERS

2011-08-10 Thread Leonid Evdokimov
the patch. Feel free to merge it in the mainline if you find it useful. Also, I've spotted at least one error in docstring in event2/dns.h - another patch for that. -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http://darkk.net.ru tel:+79816800702 && tel:+7905096522

Re: [Libevent-users] Strange timeout scheduling in 1.4

2011-08-08 Thread Leonid Evdokimov
On Mon, Aug 8, 2011 at 06:12, Dongsheng Song wrote: > On Mon, Aug 8, 2011 at 06:15, Leonid Evdokimov wrote: >> >> 2.6.24 result is really surprising me. > > Maybe you forgot the CPU not the same: That's why I have `memcpy` value - to estimate memory/CPU speed. The

Re: [Libevent-users] Strange timeout scheduling in 1.4

2011-08-07 Thread Leonid Evdokimov
k, that disabling value caching is the best option for absolutely every workload. On the other hand, this microbenchmark may be pointless because of, for example, CPU caches - I'm not benchmarking guru at all. 2.6.24 result is really surprising me. -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru

Re: [Libevent-users] [libevent-usr] When is a [regular file descriptor] readable or writable?

2011-08-03 Thread Leonid Evdokimov
rface may have unexpectedly poor performance depending on settings, kernel, OS version, etc. -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http://darkk.net.ru tel:+79816800702 && tel:+79050965222 *** To unsubsc

Re: [Libevent-users] Strange timeout scheduling in 1.4

2011-07-28 Thread Leonid Evdokimov
CPU core usage with 65536 250ms persistent timeouts 7% of single CPU core usage with 65536 250ms persistent common-timeouts So common timeouts are really nice and, moreover, trivial to use. -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http:

[Libevent-users] Strange timeout scheduling in 1.4

2011-07-27 Thread Leonid Evdokimov
d the test-case like that: $ gcc event-timeout.c -o event-timeout -levent I get same result with -O2 compilation flag. Am I missing some sort of race-condition in my code? Is it bug in libevent or expected behavior? -- WBRBW, Leonid Evdokimov xmpp:l...@darkk.net.ru && http://dar