Skip to content

Commit

Permalink
Fix argument types for setTlsPSK
Browse files Browse the repository at this point in the history
  • Loading branch information
mgdm committed Dec 4, 2013
1 parent 35d477f commit fddbc19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mosquitto.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ PHP_METHOD(Mosquitto_Client, setTlsOptions)
zend_bool verify_peer = 0;

PHP_MOSQUITTO_ERROR_HANDLING();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "bss",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "bs!s!",
&verify_peer,
&tls_version, &tls_version_len,
&ciphers, &ciphers_len
Expand All @@ -223,7 +223,7 @@ PHP_METHOD(Mosquitto_Client, setTlsPSK)
int psk_len = 0, identity_len = 0, ciphers_len = 0, retval = 0;

PHP_MOSQUITTO_ERROR_HANDLING();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "bss",
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!s!|s!",
&psk, &psk_len, &identity, &identity_len, &ciphers, &ciphers_len
) == FAILURE) {
PHP_MOSQUITTO_RESTORE_ERRORS();
Expand Down

0 comments on commit fddbc19

Please sign in to comment.