Make sure the nrfds and nefds are reset to NULL
authorMichiel van Baak <michiel@vanbaak.info>
Thu, 29 May 2008 19:10:31 +0000 (19:10 +0000)
committerMichiel van Baak <michiel@vanbaak.info>
Thu, 29 May 2008 19:10:31 +0000 (19:10 +0000)
before we enter manage_parkinglot.
This will get rid of CLI warnings like:
__ast_read: Exception flag set on 'SIP/<NUMBER>-<ID>', but no exception handler

(closes issue #12748)
Reported by: nreinartz
Patches:
      asterisk-multiparking_initialize_filedescr_sets-0.0.1.patch uploaded by nreinartz (license 452)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119015 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/features.c

index 1f2419d..2daa144 100644 (file)
@@ -2535,8 +2535,8 @@ static void *do_parking_thread(void *ignore)
 {
        fd_set rfds, efds;      /* results from previous select, to be preserved across loops. */
        fd_set nrfds, nefds;    /* args for the next select */
-       FD_ZERO(&nrfds);
-       FD_ZERO(&nefds);
+       FD_ZERO(&rfds);
+       FD_ZERO(&efds);
 
        for (;;) {
                int res = 0;
@@ -2544,6 +2544,8 @@ static void *do_parking_thread(void *ignore)
                int max = -1;   /* max fd, none there yet */
                struct ao2_iterator iter;
                struct ast_parkinglot *curlot;
+               FD_ZERO(&nrfds);
+               FD_ZERO(&nefds);
                iter = ao2_iterator_init(parkinglots, 0);
 
                while ((curlot = ao2_iterator_next(&iter))) {