Revision
15276
Author
anthm
Date
2009-10-29 13:36:18 -0500 (Thu, 29 Oct 2009)

Log Message

wrong week to quit sniffing glue

Modified Paths

Diff

Modified: freeswitch/trunk/src/switch_ivr_async.c (15275 => 15276)


--- freeswitch/trunk/src/switch_ivr_async.c	2009-10-29 18:10:55 UTC (rev 15275)
+++ freeswitch/trunk/src/switch_ivr_async.c	2009-10-29 18:36:18 UTC (rev 15276)
@@ -1014,6 +1014,15 @@
 		switch_channel_set_variable(channel, "RECORD_DATE", NULL);
 	}
 
+	if (limit) {
+		to = switch_epoch_time_now(NULL) + limit;
+	}
+
+	rh = switch_core_session_alloc(session, sizeof(*rh));
+	rh->fh = fh;
+	rh->file = switch_core_session_strdup(session, file);
+	rh->packet_len = read_impl.decoded_bytes_per_packet;
+
 	rh->min_sec = 3;
 	
 	if ((p = switch_channel_get_variable(channel, "RECORD_MIN_SEC"))) {
@@ -1023,14 +1032,6 @@
 		}
 	}
 
-	if (limit) {
-		to = switch_epoch_time_now(NULL) + limit;
-	}
-
-	rh = switch_core_session_alloc(session, sizeof(*rh));
-	rh->fh = fh;
-	rh->file = switch_core_session_strdup(session, file);
-	rh->packet_len = read_impl.decoded_bytes_per_packet;
 	
 	if ((status = switch_core_media_bug_add(session, record_callback, rh, to, flags, &bug)) != SWITCH_STATUS_SUCCESS) {
 		switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Error adding media bug for file %s\n", file);