@@ -121,6 +121,7 @@ static void test_lookup(void)
121121 /* test the "r" flag (branch lookup) */
122122 {
123123 str aor2 = str_init ("bob" ), aor3 = str_init ("carol" );
124+ struct msg_branch branch ;
124125
125126 ul .lock_udomain (d , & aor2 );
126127 ok (ul .insert_urecord (d , & aor2 , & r , 0 ) == 0 , "create AoR 2" );
@@ -134,16 +135,18 @@ static void test_lookup(void)
134135 ul .unlock_udomain (d , & aor3 );
135136
136137 /* ensure the AoR expansion process doesn't stop on a non-existing AoR */
137- str ruri1 = str_init ("sip:FOOBAR@foobar.com" );
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:FOOBAR@foobar.com" );
140+ branch .q = 1 ;
141+ ok (append_msg_branch (& branch ) == 1 , "append AoR-2" );
139142
140- str ruri2 = str_init ("sip:carol@foobar.com" );
141- ok (append_branch ( NULL , & ruri2 , NULL , NULL , 1 , 0 , NULL ) == 1 , "append AoR-3" );
143+ branch . uri = str_init ("sip:carol@foobar.com" );
144+ ok (append_msg_branch ( & branch ) == 1 , "append AoR-3" );
142145
143146 set_ruri (& msg , & aor_ruri );
144147 flags .flags = REG_BRANCH_AOR_LOOKUP_FLAG ;
145148 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" );
147150 }
148151}
149152
0 commit comments