@@ -121,6 +121,7 @@ static void test_lookup(void)
121
121
/* test the "r" flag (branch lookup) */
122
122
{
123
123
str aor2 = str_init ("bob" ), aor3 = str_init ("carol" );
124
+ struct msg_branch branch ;
124
125
125
126
ul .lock_udomain (d , & aor2 );
126
127
ok (ul .insert_urecord (d , & aor2 , & r , 0 ) == 0 , "create AoR 2" );
@@ -134,16 +135,18 @@ static void test_lookup(void)
134
135
ul .unlock_udomain (d , & aor3 );
135
136
136
137
/* ensure the AoR expansion process doesn't stop on a non-existing AoR */
137
- str ruri1 = str_init (
"sip:[email protected] " );
138
- ok (append_branch (NULL , & ruri1 , NULL , NULL , 1 , 0 , NULL ) == 1 , "append AoR-2" );
138
+ memset (& branch , 0 , sizeof branch );
139
+ branch .
uri = str_init (
"sip:[email protected] " );
140
+ branch .q = 1 ;
141
+ ok (append_msg_branch (& branch ) == 1 , "append AoR-2" );
139
142
140
- str ruri2 = str_init (
"sip:[email protected] " );
141
- ok (append_branch ( NULL , & ruri2 , NULL , NULL , 1 , 0 , NULL ) == 1 , "append AoR-3" );
143
+ branch . uri = str_init (
"sip:[email protected] " );
144
+ ok (append_msg_branch ( & branch ) == 1 , "append AoR-3" );
142
145
143
146
set_ruri (& msg , & aor_ruri );
144
147
flags .flags = REG_BRANCH_AOR_LOOKUP_FLAG ;
145
148
ok (reg_lookup (& msg , d , & flags , NULL ) == LOOKUP_OK , "lookup-8" );
146
- ok (get_nr_branches () == 1 , "get-nr-branches" );
149
+ ok (get_dset_size () == 1 , "get-nr-branches" );
147
150
}
148
151
}
149
152
0 commit comments