Add a few sanity checks when writing out the dialplan. (issue #10157 reported by dome)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@73930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2007-07-09 01:13:57 +00:00
parent 7bbda30564
commit 1944dea3bd

View File

@@ -1353,9 +1353,9 @@ static int handle_save_dialplan(int fd, int argc, char *argv[])
incomplete = 1; /* error encountered or label > 125 chars */
fprintf(output, "exten => %s%s%s,%d%s,%s(%s)\n",
ast_get_extension_name(p), sep, cid,
ast_get_extension_name(p), (ast_strlen_zero(sep) ? "" : sep), (ast_strlen_zero(cid) ? "" : cid),
ast_get_extension_priority(p), label,
ast_get_extension_app(p), tempdata);
ast_get_extension_app(p), (ast_strlen_zero(tempdata) ? "" : tempdata));
}
}
}