Browse code

- sercmd ps udp receiver description fixed to be the same as in 0.9.6 (patch from Hendrik Scholz)

(closes SER-237)

Andrei Pelinescu-Onciul authored on 01/03/2007 13:52:09
Showing 1 changed files
... ...
@@ -861,6 +861,7 @@ int main_loop()
861 861
 	int  i;
862 862
 	pid_t pid;
863 863
 	struct socket_info* si;
864
+	char si_desc[MAX_PT_DESC];
864 865
 #ifdef EXTRA_DEBUG
865 866
 	int r;
866 867
 #endif
... ...
@@ -994,8 +995,10 @@ int main_loop()
994 994
 		/* udp processes */
995 995
 		for(si=udp_listen; si; si=si->next){
996 996
 			for(i=0;i<children_no;i++){
997
+				snprintf(si_desc, MAX_PT_DESC, "receiver child=%d sock=%s:%s",
998
+					i, si->name.s, si->port_no_str.s);	
997 999
 				child_rank++;
998
-				pid = fork_process(child_rank, "udp", 1);
1000
+				pid = fork_process(child_rank, si_desc, 1);
999 1001
 				if (pid<0){
1000 1002
 					LOG(L_CRIT,  "main_loop: Cannot fork\n");
1001 1003
 					goto error;
... ...
@@ -1006,10 +1009,6 @@ int main_loop()
1006 1006
 					setstats( i+r*children_no );
1007 1007
 #endif
1008 1008
 					return udp_rcv_loop();
1009
-				}else{
1010
-						snprintf(pt[process_no].desc, MAX_PT_DESC,
1011
-							"receiver child=%d sock= %s:%s", i,
1012
-							si->name.s, si->port_no_str.s );
1013 1009
 				}
1014 1010
 			}
1015 1011
 			/*parent*/