summaryrefslogtreecommitdiff
blob: c8d409584263f76f0705ff2c57600a50f1a98a7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- asterisk-1.6.2.8-orig/main/channel.c	2010-06-06 10:04:33.439148782 +0200
+++ asterisk-1.6.2.8/main/channel.c	2010-06-06 10:05:51.124146954 +0200
@@ -2014,6 +2014,8 @@
 			chan->generator->release(chan, chan->generatordata);
 		chan->generatordata = NULL;
 	}
+
+	ast_prod(chan);
 	if (gen->alloc && !(chan->generatordata = gen->alloc(chan, params))) {
 		res = -1;
 	}
@@ -2023,8 +2025,6 @@
 	}
 	ast_channel_unlock(chan);
 
-	ast_prod(chan);
-
 	return res;
 }