ok now i changed that function to
and am using
and
first i add the two clients, then check for some other name if its there
this above code works now
but if i change
if (current->next==NULL) break;
else current = current->next;
to
current = current->next;
from the first code i put here, then it messes up, but why is changing that making a difference?
---------- Post updated at 06:23 PM ---------- Previous update was at 06:18 PM ----------
also a quick question, if i run the code, and get no error, then right away run the code again
and get this error
ERROR on binding: Address already in use
does that mean that theres something wrong with my code, or its just something i cant avoid?
if i get that error, i have to wait like 7 seconds before it works again...
How should I know? Everything I need to see is stuff you never posted. Post the complete program.
Quote:
also a quick question, if i run the code, and get no error, then right away run the code again
and get this error
ERROR on binding: Address already in use
does that mean that theres something wring with my code, or its just something i cant avoid?
It just takes time to properly close a server socket.
I can basically see 2 options here: You either continue how you are going to kind of ignore Corona and will maybe get a code that will work (that you probably won't understand truly), maybe a got that crashes, but almost certainly a code with leaks.
The other way is to step back, look at the link I've posted on page 2, read it carefully, think about pointers in C work (maybe read some little bit more about them) and then have another go.
As fas as you'll continue the first way, I'm out of this thread now
Hi, I am programming in kernel, and I want to use a double linked list that holds infos that every process could access and modify THIS list. So, I suppose it is a 'global' variable since every process(thread) can reach it, I am wondering where to put it? by changing some of the kernel files? (1 Reply)
can someone provide an example of a struct linked list, where it has strings as its values, and then how do I check if a specific string (say called buffer) exists in the list of structs?
i dont understand how to make a copy of it to check with
this is what i have
... (0 Replies)
i have a linked list set up like
typedef struct client_list {
char *client_name;
int client_socket_fd;
struct client_list *next;
} client;
client *client_list=NULL;
before adding to the list i check if it already exists, only if it does not then i add
if (client_list==NULL... (1 Reply)