Use ast_strlen_zero to avoid a crash when a Dial() string isn't passed to ParkAndAnnounce

(closes issue #16731)
Reported by: sebele67
Patches:
      issue16731_20100129.diff uploaded by seanbright (license 71)
Tested by: sebele67


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@251410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Sean Bright 16 years ago
parent dfd1365321
commit 85f79116ac

@ -112,7 +112,7 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
timeout *= 1000;
}
dial = strsep(&s, "|");
if(!dial) {
if (ast_strlen_zero(dial)) {
ast_log(LOG_WARNING, "PARK: A dial resource must be specified i.e: Console/dsp or Zap/g1/5551212\n");
ast_module_user_remove(u);
return -1;

Loading…
Cancel
Save