port problem

Chenniappan,Dhanasekaran [DBA] <>
Thu Mar 25 09:29:56 CET 2004


Hi,
 We are using ERLANG for our Dialer Development. The dialer uses the
Dialogic boards. The Dialogic boards has C APIs so we use 

Port = open_port({spawn, complex}, [{packet, 2}]),
Port!{self(),1}
loop(Port).

in loop function 

loop(Port)->
	receive
		...
	end.

In complex.exe for message 1(which was sent in Port!{self(),1}) We have the
function for start the thread. In the thread the 

  while (1)
	{
		if(sr_waitevt(30000) != -1)
		{	event();/* Function for watch and return the
dialogic events to ERLANG*/
			strcpy(prnstr,"25");
			for(i=0;i<strlen(prnstr);i++)
				buf1[i] = prnstr[i];
				write_cmd(buf1, strlen(prnstr));/* This
function is from ERLANG Sample program for Sent data to C*/
		}
		else 
		{
			strcpy(prnstr,"31");
			for(i=0;i<strlen(prnstr);i++)
				buf1[i] = prnstr[i];
				write_cmd(buf1, strlen(prnstr));
		}
	}

 Which means some data will be return continuously from C to ERLANG with the
time period of 30 seconds. The Function was working fine. But After some
hours (mostly after 3 hours of running) there is no data from the C port to
ERLANG, But the "complex" process is still running in windows (It is shown
in task manager). Is there any constraint in data transitions By this port
(like the traffic, Time,etc..). What may be the reason for this problem, and
give us your suggestion for overcome this problem. Kindly help us to solve
this issue.

With Regards
Dhanas


This communication is confidential and intended solely for the addressee(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you believe this message has been sent to you in error, please notify the sender by replying to this transmission and delete the message without disclosing it. Thank you.

E-mail including attachments is susceptible to data corruption, interruption, unauthorized amendment, tampering and viruses, and we only send and receive e-mails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof.




More information about the erlang-questions mailing list