Explorar o código

avposp: use state in searching first avp in avp_copy

- state parameter was missing when searching first avp, keeping it
  uninitialized when searching the next, causing a crash when flag 'g'
  was used in avp_copy
- reported by Jon Bonilla (Manwe)
(cherry picked from commit 027d68e9cc7afcdb3ba8922215a28e33a5225097)
Daniel-Constantin Mierla %!s(int64=15) %!d(string=hai) anos
pai
achega
59894cc9d5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      modules/avpops/avpops_impl.c

+ 1 - 1
modules/avpops/avpops_impl.c

@@ -842,7 +842,7 @@ int ops_copy_avp( struct sip_msg* msg, struct fis_param* src,
 		goto error;
 	}
 
-	avp = search_first_avp( name_type1, avp_name1, &avp_val, 0);
+	avp = search_first_avp( name_type1, avp_name1, &avp_val, &st);
 	while ( avp )
 	{
 		/* build a new avp with new name, but old value */