@@ -1192,6 +1192,7 @@ static int verify_exec(struct ast_channel *chan, const char *data)
11921192 int curl , method , extendtrust , allowtoken , sanitychecks , threshold , blacklist_failopen ;
11931193 char name [AST_MAX_CONTEXT ], verifyrequest [PATH_MAX ], verifycontext [AST_MAX_CONTEXT ], local_var [AST_MAX_CONTEXT ], stirshaken_var [AST_MAX_CONTEXT ], remote_stirshaken_var [AST_MAX_CONTEXT ], remote_var [AST_MAX_CONTEXT ], via_remote_var [AST_MAX_CONTEXT ], token_remote_var [AST_MAX_CONTEXT ], validatetokenrequest [PATH_MAX ], code_good [PATH_MAX ], code_fail [PATH_MAX ], code_spoof [PATH_MAX ], exceptioncontext [PATH_MAX ], setinvars [PATH_MAX ], failgroup [PATH_MAX ], failureaction [PATH_MAX ], failurefile [PATH_MAX ], failurelocation [PATH_MAX ], successregex [PATH_MAX ], blacklist_endpoint [PATH_MAX ], loglevel [AST_MAX_CONTEXT ], logmsg [PATH_MAX ];
11941194 float blacklist_threshold ;
1195+ char via [64 ] = { 0 };
11951196
11961197 AST_DECLARE_APP_ARGS (args ,
11971198 AST_APP_ARG (profile );
@@ -1397,7 +1398,6 @@ static int verify_exec(struct ast_channel *chan, const char *data)
13971398 }
13981399 } else { /* reverse */
13991400 char remote_result [64 ] = { 0 };
1400- char via [64 ] = { 0 };
14011401 char peerip [50 ]; /* more than the max IP address size */
14021402 char * dialstring , * peer ;
14031403 char ip [50 ];
@@ -1559,11 +1559,19 @@ static int verify_exec(struct ast_channel *chan, const char *data)
15591559 }
15601560success : /* only as a branch, if we fall through to here, that doesn't necessarily mean success */
15611561 verify_set_var (chan , local_var , vresult );
1562- ast_verb (3 , "Verification result for %s (%s) is '%s' (SUCCESS)\n" , callerid , name , vresult ? vresult : "(null)" );
1562+ if (viaverify ) {
1563+ ast_verb (3 , "Verification result for %s (%s, via %s) is '%s' (SUCCESS)\n" , callerid , name , via , vresult ? vresult : "(null)" );
1564+ } else {
1565+ ast_verb (3 , "Verification result for %s (%s) is '%s' (SUCCESS)\n" , callerid , name , vresult ? vresult : "(null)" );
1566+ }
15631567 goto done ;
15641568fail :
15651569 verify_set_var (chan , local_var , viaverify ? code_spoof : code_fail );
1566- ast_verb (3 , "Verification result for %s (%s) is '%s' (FAILURE)\n" , callerid , name , viaverify ? (* code_spoof ? code_spoof : "(null)" ) : (* code_fail ? code_fail : "(null)" ));
1570+ if (viaverify ) {
1571+ ast_verb (3 , "Verification result for %s (%s, via %s) is '%s' (FAILURE)\n" , callerid , name , via , viaverify ? (* code_spoof ? code_spoof : "(null)" ) : (* code_fail ? code_fail : "(null)" ));
1572+ } else {
1573+ ast_verb (3 , "Verification result for %s (%s) is '%s' (FAILURE)\n" , callerid , name , viaverify ? (* code_spoof ? code_spoof : "(null)" ) : (* code_fail ? code_fail : "(null)" ));
1574+ }
15671575 }
15681576
15691577done :
0 commit comments