@henningw commented on this pull request.

Thanks for the pull request - I found two things that should be improved before integrating the code.


In src/modules/tm/t_serial.c:

> +	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));

This is not necessary (and will also overwrite the state for the global one). The random generator is initialized during startup.


In src/modules/tm/t_serial.h:

> @@ -28,14 +28,19 @@
 #ifndef _T_SERIAL_H_
 #define _T_SERIAL_H_
 
+#define STANDARD 0

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


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.