> +{
> +     handle_async_t* _ah;
> +    handle_con_t * _handle;
> +    handle_set_t * _p = (handle_set_t*)_h->tail;
> +
> +     if (_s->len > 16384) {
> +             LM_ERR("query exceeds buffer size(16384)!\n");
> +             return -1;
> +     }
> +
> +     if ((_ah=pkg_malloc(sizeof(handle_async_t)+_s->len)) == NULL) {
> +             LM_ERR("no more pkg\n");
> +             return -1;
> +     } else {
> +             /* for RR next time the script shall trigger this,
> +              * other dest shall be called*/

I literally had to read the code in order to understand the comment, rather 
than vice-verse!

Rule of thumb: when it comes to formulating comments, two things should come to 
mind: **well-written** vs. **badly-written** (language, acronyms, doc 
templates, coding style, etc.). **insightful** vs. **impeding** (usefulness of 
the comment itself: do you really have to *explain how round-robin works*, or 
simply that this code just does a *"round-robin increment"*?)

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/715/files#r53200651
_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to