summaryrefslogtreecommitdiff
path: root/pbx
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2003-04-06 18:19:51 +0000
committerMark Spencer <markster@digium.com>2003-04-06 18:19:51 +0000
commitf8755643cd9724cc29c5ef2da8a4fd51714676a3 (patch)
treeffb2ec150363a599ae454201f011ad6830e00367 /pbx
parent77b48c0aedef0e9e3ee5b63e47866daa774b353c (diff)
Merge enhanced status changes, add SIP subscribe from Andre
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx')
-rwxr-xr-xpbx/pbx_config.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c
index b957f29e4..baed0f9fe 100755
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -1084,13 +1084,15 @@ static int handle_context_add_extension(int fd, int argc, char *argv[])
cidmatch = NULL;
}
prior = strsep(&whole_exten,",");
- if (!strcmp(prior, "hint")) {
- iprior = PRIORITY_HINT;
- } else {
- iprior = atoi(prior);
+ if (prior) {
+ if (!strcmp(prior, "hint")) {
+ iprior = PRIORITY_HINT;
+ } else {
+ iprior = atoi(prior);
+ }
}
app = strsep(&whole_exten,",");
- if ((start = strchr(app, '(')) && (end = strrchr(app, ')'))) {
+ if (app && (start = strchr(app, '(')) && (end = strrchr(app, ')'))) {
*start = *end = '\0';
app_data = start + 1;
for (start = app_data; *start; start++)