From e2aa31c8ce772fecd4becbbf335bb98605a636b2 Mon Sep 17 00:00:00 2001
From: Mark Spencer <markster@digium.com>
Date: Sat, 25 Dec 1999 22:31:01 +0000
Subject: [PATCH] Version 0.1.2 from FTP

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 apps/app_intercom.c    | 6 +++---
 include/asterisk/pbx.h | 5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/apps/app_intercom.c b/apps/app_intercom.c
index d7f253c806..97b427ba15 100755
--- a/apps/app_intercom.c
+++ b/apps/app_intercom.c
@@ -59,7 +59,7 @@ static int write_audio(short *data, int len)
 		pthread_mutex_unlock(&sound_lock);
         return -1;
     }
-		res = write(sound, data, len);
+	res = write(sound, data, len);
 	pthread_mutex_unlock(&sound_lock);
 	return res;
 }
@@ -97,7 +97,7 @@ static int create_audio()
 		return -1;
 	}
 	if (fmt != desired) {
-		ast_log(LOG_WARNING, "Requested %d Hz, got %d Hz -- sound may be choppy\n");
+		ast_log(LOG_WARNING, "Requested %d Hz, got %d Hz -- sound may be choppy\n", desired, fmt);
 	}
 #if 1
 	/* 2 bytes * 15 units of 2^5 = 32 bytes per buffer */
@@ -146,7 +146,7 @@ static int intercom_exec(struct ast_channel *chan, void *data)
 									res = 0;
 							} else
 								ast_log(LOG_DEBUG, "Unable to handle non-signed linear frame (%d)\n", f->subclass);
-						}
+						} 
 					}
 					ast_frfree(f);
 				} else
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index 37d65a16d9..e84ec59cfe 100755
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -56,6 +56,11 @@ int ast_unregister_application(char *app);
 /* If an extension exists, return non-zero */
 int ast_exists_extension(struct ast_channel *c, char *context, char *exten, int priority);
 
+/* If "exten" *could be* a valid extension in this context with or without
+   some more digits, return non-zero.  Basically, when this returns 0, no matter
+   what you add to exten, it's not going to be a valid extension anymore */
+int ast_canmatch_extension(struct ast_channel *c, char *context, char *exten, int priority);
+
 /* Launch a new extension (i.e. new stack) */
 int ast_spawn_extension(struct ast_channel *c, char *context, char *exten, int priority);
 
-- 
GitLab