From da29629a35d143dc564bf7997748ecff840f67d3 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 1 Aug 2014 21:33:14 +0200 Subject: [PATCH] recognize recent ares options --- php_ares.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/php_ares.c b/php_ares.c index 050b161..ee6defa 100644 --- a/php_ares.c +++ b/php_ares.c @@ -589,6 +589,17 @@ local php_ares_options *php_ares_options_ctor(php_ares_options *options, HashTab options->flags |= ARES_OPT_LOOKUPS; options->strct.lookups = estrdup(Z_STRVAL_PP(opt)); } +#ifdef ARES_OPT_ROTATE + if ((SUCCESS == zend_hash_find(ht, "rotate", sizeof("rotate"), (void *) &opt)) && i_zend_is_true(*opt)) { + options->flags |= ARES_OPT_ROTATE; + } +#endif +#ifdef ARES_OPT_EDNSPSZ + if ((SUCCESS == zend_hash_find(ht, "ednspsz", sizeof("ednspsz"), (void *) &opt)) && is_numeric(opt, &lval)) { + options->flags |= ARES_OPT_EDNSPSZ; + options->strct.ednspsz = lval; + } +#endif } return options; -- 2.30.2