<p><b>@henningw</b> commented on this pull request.</p>

<p>Thanks for the pull request - I found two things that should be improved before integrating the code.</p><hr>

<p>In <a href="https://github.com/kamailio/kamailio/pull/2178#discussion_r358340754">src/modules/tm/t_serial.c</a>:</p>
<pre style='color:#555'>> +    return 0;
+}
+
+/*
+ * Loads contacts in destination set into contacts_avp in reverse
+ * proportional order. Each contact is associated with Q_FLAG beacuse
+ * only one contact at a time has to ring.
+ */
+int t_load_contacts_proportional(struct contact *contacts, char *sock_buf, int n, unsigned short q_total)
+{
+       int q_remove, n_rand, idx;
+       struct contact *curr;
+       sr_xavp_t *lxavp = NULL;
+
+       /* Initialize the random generator */
+       kam_srand(time(NULL));
</pre>
<p>This is not necessary (and will also overwrite the state for the global one). The random generator is initialized during startup.</p>

<hr>

<p>In <a href="https://github.com/kamailio/kamailio/pull/2178#discussion_r358342425">src/modules/tm/t_serial.h</a>:</p>
<pre style='color:#555'>> @@ -28,14 +28,19 @@
 #ifndef _T_SERIAL_H_
 #define _T_SERIAL_H_
 
+#define STANDARD 0
</pre>
<p>Makes probably sense to qualify the defines, e.g. with T_LOAD_ prefix or similar. Also consider to move them into the respective .c file, if they are not necessary in the .h</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/2178?email_source=notifications&email_token=ABO7UZJIEGGUKLG5DB4R7BTQY6WG3A5CNFSM4J3J7BZKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCPKLL3Q#pullrequestreview-332707310">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZNVHHAE2NJQOTNP25LQY6WG3ANCNFSM4J3J7BZA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZKERV5JBGT2WT23ZUDQY6WG3A5CNFSM4J3J7BZKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCPKLL3Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/2178?email_source=notifications\u0026email_token=ABO7UZJIEGGUKLG5DB4R7BTQY6WG3A5CNFSM4J3J7BZKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCPKLL3Q#pullrequestreview-332707310",
"url": "https://github.com/kamailio/kamailio/pull/2178?email_source=notifications\u0026email_token=ABO7UZJIEGGUKLG5DB4R7BTQY6WG3A5CNFSM4J3J7BZKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCPKLL3Q#pullrequestreview-332707310",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>