edink Tue Dec 10 11:56:24 2002 EDT Modified files: (Branch: PHP_4_3) /php4/ext/snmp snmp.c Log: Fix ZTS build. Index: php4/ext/snmp/snmp.c diff -u php4/ext/snmp/snmp.c:1.70.2.1 php4/ext/snmp/snmp.c:1.70.2.2 --- php4/ext/snmp/snmp.c:1.70.2.1 Thu Dec 5 14:33:43 2002 +++ php4/ext/snmp/snmp.c Tue Dec 10 11:56:23 2002 @@ -18,7 +18,7 @@ | Harrie Hazewinkel <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: snmp.c,v 1.70.2.1 2002/12/05 19:33:43 derick Exp $ */ +/* $Id: snmp.c,v 1.70.2.2 2002/12/10 16:56:23 edink Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -587,7 +587,7 @@ /* {{{ proto int netsnmp_session_set_sec_level(struct snmp_session *s, char *level) Set the security level in the snmpv3 session */ -static int netsnmp_session_set_sec_level(struct snmp_session *s, char *level) +static int netsnmp_session_set_sec_level(struct snmp_session *s, char *level +TSRMLS_DC) { if ((s) && (level)) { if (!strcasecmp(level, "noAuthNoPriv") || !strcasecmp(level, "nanp")) { @@ -608,7 +608,7 @@ /* {{{ proto int netsnmp_session_set_auth_protocol(struct snmp_session *s, char *prot) Set the authentication protocol in the snmpv3 session */ -static int netsnmp_session_set_auth_protocol(struct snmp_session *s, char *prot) +static int netsnmp_session_set_auth_protocol(struct snmp_session *s, char *prot +TSRMLS_DC) { if ((s) && (prot)) { if (!strcasecmp(prot, "MD5")) { @@ -629,7 +629,7 @@ /* {{{ proto int netsnmp_session_set_sec_protocol(struct snmp_session *s, char *prot) Set the security protocol in the snmpv3 session */ -static int netsnmp_session_set_sec_protocol(struct snmp_session *s, char *prot) +static int netsnmp_session_set_sec_protocol(struct snmp_session *s, char *prot +TSRMLS_DC) { if ((s) && (prot)) { if (!strcasecmp(prot, "DES")) { @@ -660,7 +660,7 @@ /* {{{ proto int netsnmp_session_gen_auth_key(struct snmp_session *s, char *pass) Make key from pass phrase in the snmpv3 session */ -static int netsnmp_session_gen_auth_key(struct snmp_session *s, char *pass) +static int netsnmp_session_gen_auth_key(struct snmp_session *s, char *pass TSRMLS_DC) { /* * make master key from pass phrases @@ -692,7 +692,7 @@ /* {{{ proto int netsnmp_session_gen_sec_key(struct snmp_session *s, u_char *pass) Make key from pass phrase in the snmpv3 session */ -static int netsnmp_session_gen_sec_key(struct snmp_session *s, u_char *pass) +static int netsnmp_session_gen_sec_key(struct snmp_session *s, u_char *pass TSRMLS_DC) { if ((s) && (pass) && strlen(pass)) { s->securityPrivKeyLen = USM_PRIV_KU_LEN; @@ -773,34 +773,34 @@ /* Setting the security level. */ convert_to_string_ex(a3); - if (netsnmp_session_set_sec_level(&session, Z_STRVAL_PP(a3))) { + if (netsnmp_session_set_sec_level(&session, Z_STRVAL_PP(a3) TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid security level: %s", a3); RETURN_FALSE; } /* Setting the authentication protocol. */ convert_to_string_ex(a4); - if (netsnmp_session_set_auth_protocol(&session, Z_STRVAL_PP(a4))) { + if (netsnmp_session_set_auth_protocol(&session, Z_STRVAL_PP(a4) TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid authentication protocol: %s", Z_STRVAL_PP(a4)); RETURN_FALSE; } /* Setting the authentication passphrase. */ convert_to_string_ex(a5); - if (netsnmp_session_gen_auth_key(&session, Z_STRVAL_PP(a5))) { + if (netsnmp_session_gen_auth_key(&session, Z_STRVAL_PP(a5) TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not generate key for authentication pass phrase: %s", Z_STRVAL_PP(a4)); RETURN_FALSE; } /* Setting the security protocol. */ convert_to_string_ex(a6); - if (netsnmp_session_set_sec_protocol(&session, Z_STRVAL_PP(a6)) && + if (netsnmp_session_set_sec_protocol(&session, Z_STRVAL_PP(a6) TSRMLS_CC) && (0 != strlen(Z_STRVAL_PP(a6)))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid security protocol: %s", Z_STRVAL_PP(a6)); RETURN_FALSE; } /* Setting the security protocol passphrase. */ convert_to_string_ex(a7); - if (netsnmp_session_gen_sec_key(&session, Z_STRVAL_PP(a7)) && + if (netsnmp_session_gen_sec_key(&session, Z_STRVAL_PP(a7) TSRMLS_CC) && (0 != strlen(Z_STRVAL_PP(a7)))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not generate key for security pass phrase: %s", Z_STRVAL_PP(a7)); RETURN_FALSE;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php