aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-29 15:38:02 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-07-29 15:38:02 +0000
commit5ec52e802ca50b91024828cc7bf05484eedee724 (patch)
tree411d8c3fc84d243729062e20aa6bf8ccfb8b0512 /pbx.c
parent37312e1c31e5b5037a3024dd42dbf9c2b0148ef3 (diff)
Minor fixes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1235 f38db490-d61c-443f-a65b-d21fe96a405b
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)