[asterisk-dev] Re: [asterisk-commits] russell: trunk r53047 - in /trunk: ./ apps/ channels/ main/ pbx/

Sean Bright sean.bright at gmail.com
Wed Jan 31 18:12:45 MST 2007


FYI,

You're adding redundant calls to pthread_attr_destroy in apps/app_rpt.c in
that patch (see below).

Sean


Modified: trunk/apps/app_rpt.c
> URL:
> http://svn.digium.com/view/asterisk/trunk/apps/app_rpt.c?view=diff&rev=53047&r1=53046&r2=53047
>
> ==============================================================================
> --- trunk/apps/app_rpt.c (original)
> +++ trunk/apps/app_rpt.c Wed Jan 31 15:35:15 2007
> @@ -3188,6 +3188,7 @@
>         pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
>         ast_pthread_create(&myrpt->rpt_call_thread, &attr, rpt_call, (void
> *) myrpt);
>         pthread_attr_destroy(&attr);
> +       pthread_attr_destroy(&attr);
>         return DC_COMPLETE;
> }
>
> @@ -5540,6 +5541,7 @@
>                         pthread_attr_init(&attr);
>                         pthread_attr_setdetachstate(&attr,
> PTHREAD_CREATE_DETACHED);
>                         ast_pthread_create(&myrpt->rpt_call_thread, &attr,
> rpt_call, (void *)myrpt);
> +                       pthread_attr_destroy(&attr);
>                         pthread_attr_destroy(&attr);
>                         return;
>                 }
> @@ -6736,6 +6738,7 @@
>                 pthread_attr_setdetachstate(&attr,
> PTHREAD_CREATE_DETACHED);
>                 ast_pthread_create(&rpt_vars[i].rpt_thread, &attr, rpt,
> (void *) &rpt_vars[i]);
>                 pthread_attr_destroy(&attr);
> +               pthread_attr_destroy(&attr);
>         }
>         usleep(500000);
>         for (;;) {
> @@ -6764,6 +6767,7 @@
>                                 pthread_attr_init(&attr);
>                                 pthread_attr_setdetachstate(&attr,
> PTHREAD_CREATE_DETACHED);
>                                 ast_pthread_create(&rpt_vars[i].rpt_thread,
> &attr, rpt, (void *) &rpt_vars[i]);
> +                               pthread_attr_destroy(&attr);
>                                 pthread_attr_destroy(&attr);
>                                 ast_log(LOG_WARNING, "rpt_thread restarted
> on node %s\n", rpt_vars[i].name);
>                         }



sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20070131/350284c0/attachment.htm


More information about the asterisk-dev mailing list