Skip to content

Instantly share code, notes, and snippets.

@libryder
Created January 25, 2012 16:30
Show Gist options
  • Save libryder/1677084 to your computer and use it in GitHub Desktop.
Save libryder/1677084 to your computer and use it in GitHub Desktop.
app_swift patch to fix segfault bug
diff -ruN app_swift-2.0_ast-1.6.orig/app_swift.c app_swift-2.0_ast-1.6/app_swift.c
--- app_swift-2.0_ast-1.6.orig/app_swift.c 2010-06-16 08:35:30.000000000 +0930
+++ app_swift-2.0_ast-1.6/app_swift.c 2010-08-17 20:31:08.000000000 +0930
@@ -409,7 +409,8 @@
ASTOBJ_WRLOCK(ps);
ps->immediate_exit = 1;
ASTOBJ_UNLOCK(ps);
- } else if (f->frametype == AST_FRAME_DTMF && timeout > 0 && max_digits > 0) {
+ } else {
+ if (f->frametype == AST_FRAME_DTMF && timeout > 0 && max_digits > 0) {
char originDTMF = f->subclass;
alreadyran = 1;
res = 0;
@@ -430,6 +431,7 @@
pbx_builtin_setvar_helper(chan, "SWIFT_DTMF", results);
}
ast_frfree(f);
+ }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment