Lines Matching refs:newval
2159 static int php_snmp_write_info(php_snmp_object *snmp_object, zval *newval)
2167 static int php_snmp_write_max_oids(php_snmp_object *snmp_object, zval *newval) in php_snmp_write_max_oids() argument
2172 if (Z_TYPE_P(newval) == IS_NULL) { in php_snmp_write_max_oids()
2177 if (Z_TYPE_P(newval) != IS_LONG) { in php_snmp_write_max_oids()
2178 ztmp = *newval; in php_snmp_write_max_oids()
2181 newval = &ztmp; in php_snmp_write_max_oids()
2184 if (Z_LVAL_P(newval) > 0) { in php_snmp_write_max_oids()
2185 snmp_object->max_oids = Z_LVAL_P(newval); in php_snmp_write_max_oids()
2187 …L, E_WARNING, "max_oids should be positive integer or NULL, got " ZEND_LONG_FMT, Z_LVAL_P(newval)); in php_snmp_write_max_oids()
2190 if (newval == &ztmp) { in php_snmp_write_max_oids()
2191 zval_dtor(newval); in php_snmp_write_max_oids()
2199 static int php_snmp_write_valueretrieval(php_snmp_object *snmp_object, zval *newval) in php_snmp_write_valueretrieval() argument
2204 if (Z_TYPE_P(newval) != IS_LONG) { in php_snmp_write_valueretrieval()
2205 ztmp = *newval; in php_snmp_write_valueretrieval()
2208 newval = &ztmp; in php_snmp_write_valueretrieval()
2211 …if (Z_LVAL_P(newval) >= 0 && Z_LVAL_P(newval) <= (SNMP_VALUE_LIBRARY|SNMP_VALUE_PLAIN|SNMP_VALUE_O… in php_snmp_write_valueretrieval()
2212 snmp_object->valueretrieval = Z_LVAL_P(newval); in php_snmp_write_valueretrieval()
2214 …cref(NULL, E_WARNING, "Unknown SNMP value retrieval method '" ZEND_LONG_FMT "'", Z_LVAL_P(newval)); in php_snmp_write_valueretrieval()
2218 if (newval == &ztmp) { in php_snmp_write_valueretrieval()
2219 zval_dtor(newval); in php_snmp_write_valueretrieval()
2227 static int php_snmp_write_##name(php_snmp_object *snmp_object, zval *newval) \
2230 ZVAL_COPY(&ztmp, newval); \
2232 newval = &ztmp; \
2234 snmp_object->name = Z_TYPE_P(newval) == IS_TRUE? 1 : 0; \
2244 static int php_snmp_write_oid_output_format(php_snmp_object *snmp_object, zval *newval) in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
2248 if (Z_TYPE_P(newval) != IS_LONG) { in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
2249 ZVAL_COPY(&ztmp, newval); in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
2251 newval = &ztmp; in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
2254 switch(Z_LVAL_P(newval)) { in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
2261 snmp_object->oid_output_format = Z_LVAL_P(newval); in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
2264 …_docref(NULL, E_WARNING, "Unknown SNMP output print format '" ZEND_LONG_FMT "'", Z_LVAL_P(newval)); in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
2269 if (newval == &ztmp) { in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
2270 zval_ptr_dtor(newval); in PHP_SNMP_BOOL_PROPERTY_WRITER_FUNCTION()
2277 static int php_snmp_write_exceptions_enabled(php_snmp_object *snmp_object, zval *newval) in php_snmp_write_exceptions_enabled() argument
2281 if (Z_TYPE_P(newval) != IS_LONG) { in php_snmp_write_exceptions_enabled()
2282 ZVAL_COPY(&ztmp, newval); in php_snmp_write_exceptions_enabled()
2284 newval = &ztmp; in php_snmp_write_exceptions_enabled()
2287 snmp_object->exceptions_enabled = Z_LVAL_P(newval); in php_snmp_write_exceptions_enabled()
2289 if (newval == &ztmp) { in php_snmp_write_exceptions_enabled()
2290 zval_ptr_dtor(newval); in php_snmp_write_exceptions_enabled()