Fix rlocs_find_two_ipv4

This commit is contained in:
Nick Thomas
2013-08-22 03:38:01 +01:00
parent 08b209d810
commit be95b61c87

View File

@@ -458,17 +458,14 @@ int rlocs_find_two_ipv4(
struct rloc **d_rloc_ptr, struct in_addr *d_rloc_addr struct rloc **d_rloc_ptr, struct in_addr *d_rloc_addr
) )
{ {
struct rloc *s_rloc = *s_rloc_ptr;
struct rloc *d_rloc = *d_rloc_ptr;
char addr_str[128]; char addr_str[128];
if ( ( s_rloc = rloc_find_by_address( reg, s_rloc_addr, NULL ) ) == NULL ) { if ( ( *s_rloc_ptr = rloc_find_by_address( reg, s_rloc_addr, NULL ) ) == NULL ) {
inet_ntop( AF_INET, s_rloc_addr, &addr_str[0], 128 ); inet_ntop( AF_INET, s_rloc_addr, &addr_str[0], 128 );
debug( "Couldn't find source rloc (%s) in DB", addr_str ); debug( "Couldn't find source rloc (%s) in DB", addr_str );
return 0; return 0;
} }
if ( ( d_rloc = rloc_find_by_address( reg, d_rloc_addr, NULL ) ) == NULL ) { if ( ( *d_rloc_ptr = rloc_find_by_address( reg, d_rloc_addr, NULL ) ) == NULL ) {
inet_ntop( AF_INET, d_rloc_addr, &addr_str[0], 128 ); inet_ntop( AF_INET, d_rloc_addr, &addr_str[0], 128 );
debug( "Couldn't find destination rloc (%s) in DB", addr_str ); debug( "Couldn't find destination rloc (%s) in DB", addr_str );
return 0; return 0;