diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-01-14 18:30:53 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-01-14 18:30:53 +0000 |
commit | ae80363d51b26a03acb4edd0484aabd03cc7d948 (patch) | |
tree | e106ea088a54d1e4e158d6e3e706371a4219dc3a | |
parent | 3eb34887876fa2a83914beb337a09e4638733fee (diff) |
make ztcfg able to tolerate tone zones already being loaded and selected as default (or in use by channels) without aborting the configuration process
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3686 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | tonezone.c | 3 | ||||
-rw-r--r-- | ztcfg.c | 3 |
2 files changed, 4 insertions, 2 deletions
@@ -369,7 +369,8 @@ int tone_zone_register_zone(int fd, struct tone_zone *z) x = z->zone; if ((res = ioctl(fd, ZT_FREEZONE, &x))) { - fprintf(stderr, "ioctl(ZT_FREEZONE) failed: %s\n", strerror(errno)); + if (errno != EBUSY) + fprintf(stderr, "ioctl(ZT_FREEZONE) failed: %s\n", strerror(errno)); return res; } @@ -1451,7 +1451,8 @@ int main(int argc, char *argv[]) fflush(stdout); } if (tone_zone_register(fd, zonestoload[x])) - error("Unable to register tone zone '%s'\n", zonestoload[x]); + if (errno != EBUSY) + error("Unable to register tone zone '%s'\n", zonestoload[x]); } if (debug & DEBUG_APPLY) { printf("Doing startup\n"); |