summaryrefslogtreecommitdiff
path: root/pbx.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2003-07-29 15:38:02 +0000
committerMark Spencer <markster@digium.com>2003-07-29 15:38:02 +0000
commit34b28107e26c5c0deb9498bd3016a1bbd5d9b1e2 (patch)
tree411d8c3fc84d243729062e20aa6bf8ccfb8b0512 /pbx.c
parentfbada4d85a0a9a22a86996220419a53a6e125641 (diff)
Minor fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pbx.c b/pbx.c
index 903476241..00d53e01e 100755
--- a/pbx.c
+++ b/pbx.c
@@ -1115,8 +1115,10 @@ static int pbx_extension_helper(struct ast_channel *c, char *context, char *exte
app = pbx_findapp(e->app);
pthread_mutex_unlock(&conlock);
if (app) {
- strncpy(c->context, context, sizeof(c->context-1));
- strncpy(c->exten, exten, sizeof(c->exten)-1);
+ if (c->context != context)
+ strncpy(c->context, context, sizeof(c->context-1));
+ if (c->exten != exten)
+ strncpy(c->exten, exten, sizeof(c->exten)-1);
c->priority = priority;
pbx_substitute_variables(passdata, sizeof(passdata), c, e);
if (option_debug)