recognize recent ares options
authorMichael Wallner <mike@php.net>
Fri, 1 Aug 2014 19:33:14 +0000 (21:33 +0200)
committerMichael Wallner <mike@php.net>
Fri, 1 Aug 2014 19:33:14 +0000 (21:33 +0200)
php_ares.c

index 050b161f533e531fc8d4c6b5c5c67db5e57b0683..ee6defacac635fa2b114b4f10563c52acf4a4b81 100644 (file)
@@ -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;