cvs: php4 /ext/snmp snmp.c

From: Date: Tue, 10 Dec 2002 17:07:41 +0000
Subject: cvs: php4 /ext/snmp snmp.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-17070@lists.php.net to get a copy of this message
edink Tue Dec 10 12:07:41 2002 EDT Modified files: /php4/ext/snmp snmp.c Log: MFB: Fix ZTS build. Index: php4/ext/snmp/snmp.c diff -u php4/ext/snmp/snmp.c:1.71 php4/ext/snmp/snmp.c:1.72 --- php4/ext/snmp/snmp.c:1.71 Thu Dec 5 14:33:03 2002 +++ php4/ext/snmp/snmp.c Tue Dec 10 12:07:40 2002 @@ -18,7 +18,7 @@ | Harrie Hazewinkel <harrie@lisanza.net> | +----------------------------------------------------------------------+ */ -/* $Id: snmp.c,v 1.71 2002/12/05 19:33:03 derick Exp $ */ +/* $Id: snmp.c,v 1.72 2002/12/10 17:07:40 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;

« previous php.cvs (#17070) next »