X-bee technical issue

Dear all,
I have 2 nos of X-Bee transceivers and a RCM5700 module. i have two computers where one computer is connected to my RCM5700 and a serial board where one X Bee is connected. Second PC is connected with another X Bee module. I am trying to send data from my second (remote pc) to my 1st PC where i have connected RCM module. This is the pgm which i have written for that. Data is sent through hyperterminal
while (1)


    serBwrFlush();  //Cleaning the transmit buffer of port B
	  serBrdFlush();  //Cleaning the input buffer of port B

     wfd getOk = cof_serBgets(s, maxs, timeout);

       if (getOk)
         printf("string is %s",s);

Here my getok is getting high when ever i am connecting my serial port with X Bee module even when data is not transmitting also. So some garbage value is displayed each time of execution.Can somebody suggest a solution to solve this issue?

Hopefully expecting a reply