1 .Attenzione mio caro questa funzione è VULNERABILE ad un attacco di BUFFER OVERFLOW, con il quale un ipotetico "malintenzionato" puo eseguire del codice macchina DA REMOTO.
Quindi correggi per favore

codice:
void readName(int socketID)
{
		char a;
		char buffer[MAXSIZE];
		int i=0;
		while(read(socketID,&a,1) > 0){
			if(a!='!')
				buffer[i++]=a;
			else
				break;
		}
		buffer[i]='\0';
		fflush(stdout);
		iP = getPeerIP(socketID);	
		//sendList(socketID);
		insertPeerToList(iP, buffer);
		
	
}
2. In questa funzione tutti i *(newPeer).nome PUNTERANNO a name, ma NON CONTERANNO il suo valore, stessa cosa per *(newPeer).ip. Devi USARE la strncpy

codice:
void insertPeerToList(char *iP, char *name){
	PEERPTR newPeer= malloc(sizeof(PEER));
	newPeer->nome=name;
	newPeer->ip= iP;
	
	PEERPTR temp;
	temp = firstElement;
	if(temp!=NULL){
		while(temp->next != NULL)
			temp=temp->next;	
		temp->next=newPeer;
	}
	else
	firstElement=newPeer;
	printList();
}
3. Se firstElement è un puntatore allora:
codice:
temp = firstElement;
è sbagliato, se invece non è un puntatore, allora:
codice:
firstElement = newPeer;
è sbagliato

4. temp non è un puntatore ...

codice:
if(temp!=NULL){
	while(temp->next != NULL)
		temp=temp->next;	
		temp->next=newPeer;
	}
}
Stai attento quando scrivi codice, soprattuto se server-side. Poi mi chiedo come mai il tuo compilatore non ti abbia segnalato certi erroracci