Skip to content

Commit db94554

Browse files
jeromealanxz
jerome
authored andcommitted
Examples: fix argument parsing in sendstring example
1 parent e1eaaac commit db94554

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/amqp_ssl_connect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ int main(int argc, char const *const *argv) {
100100
amqp_ssl_socket_set_verify_hostname(socket, 0);
101101

102102
if (argc > 5) {
103-
int nextarg = 6;
104-
die_on_error(amqp_ssl_socket_set_cacert(socket, argv[5]),
103+
int nextarg = 5;
104+
die_on_error(amqp_ssl_socket_set_cacert(socket, argv[4]),
105105
"setting CA certificate");
106106
if (argc > nextarg && !strcmp("verifypeer", argv[nextarg])) {
107107
amqp_ssl_socket_set_verify_peer(socket, 1);

0 commit comments

Comments
 (0)