Open sqeedward opened 10 months ago
Hi @sqeedward
It seems like there might be an issue with the sender_addr_len variable. In the recvfrom function, you are passing the address of sender_addr_len to store the size of the sender's address. However, it looks like that sender_addr_len variable is not initialized before calling recvfrom. This could lead to unpredictable behavior and might be the reason why you are not getting the correct IP address.
To fix this issue, you should initialize sender_addr_len before using it. Add the following line before the recvfrom function:
sender_addr_len = sizeof(sender_addr);
Can you do this fix, please?
I assigned this issue to @Alex-deVis since he is the owner of the code. He might help you. Otherwise, @Alex-deVis , please make sure we have a fix for this problem.
I'll pass this to @andreia-oca since this might be reused as a demo for GitHub operations.
Pe scheletul de cod cand rezolvam exercitiul, primul mesaj va fi mereu: Received from IP 0.0.0.0 and port 0: "mesajul". Isi revine ulterior dupa primul input.