fgets not working correctly
There are two different programs, one is called SEND and one is called RECIEVE. The code for both of these was given and originally they communicated with each other using simplex communication (one way). The assignment was to implement half duplex communication (both ways, one at a time.) The code for RECIEVE is at [C] RECIEVE - Pastebin.com. The error is at line 175. I am running it using a linux terminal. Basically what happens is I'm able to send a message from SEND and RECIEVE notifies me that it got it and then I'm supposed to send a message back and it never gets past the fgets.
http://i.imgur.com/CVaFU.png
Thats a screen shot of what I get when I run this program. The first line comes from the send program but the last two with red arrows pointing at them come from this program. As you can see it gets to the recieved line, and then outputs enter line2, and then nothing.
My question is obviously, why won't fgets take my input and continue along with the program?