mostly useless fixes
This commit is contained in:
parent
56a7863884
commit
5e17585bea
@ -32,7 +32,7 @@
|
|||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
/* Config spécifique serveur */
|
/* Config specifique serveur */
|
||||||
char *adr_ip = NULL;
|
char *adr_ip = NULL;
|
||||||
int port = 0;
|
int port = 0;
|
||||||
int online = TRUE;
|
int online = TRUE;
|
||||||
@ -45,7 +45,7 @@ FILE *outerr = NULL;
|
|||||||
Elt *clients_list = NULL;
|
Elt *clients_list = NULL;
|
||||||
Elt *drinks_list = NULL;
|
Elt *drinks_list = NULL;
|
||||||
|
|
||||||
/* Config spécifique connexion des clients */
|
/* Config specifique connexion des clients */
|
||||||
char *pseudo = NULL;
|
char *pseudo = NULL;
|
||||||
char *drink = NULL;
|
char *drink = NULL;
|
||||||
char *logout = NULL;
|
char *logout = NULL;
|
||||||
@ -315,7 +315,7 @@ int initiate (int socket_service, userinfos *infos) {
|
|||||||
|
|
||||||
pthread_mutex_lock (&mutex_clients);
|
pthread_mutex_lock (&mutex_clients);
|
||||||
if (exist_elt (clients_list, infos->nom)) {
|
if (exist_elt (clients_list, infos->nom)) {
|
||||||
char nick_ok[MAXSTRLEN];
|
char nick_ok[MAXSTRLEN+1];
|
||||||
snprintf (nick_ok, MAXSTRLEN, "@%s", infos->nom);
|
snprintf (nick_ok, MAXSTRLEN, "@%s", infos->nom);
|
||||||
snprintf (infos->nom, MAXSTRLEN, "%s", nick_ok);
|
snprintf (infos->nom, MAXSTRLEN, "%s", nick_ok);
|
||||||
send_infos (socket_service, "@Pseudo déjà utilisé !\n");
|
send_infos (socket_service, "@Pseudo déjà utilisé !\n");
|
||||||
@ -504,7 +504,7 @@ void guinnessd_init (int argc, char *argv[]) {
|
|||||||
int main (int argc, char *argv[]) {
|
int main (int argc, char *argv[]) {
|
||||||
int socket_ecoute;
|
int socket_ecoute;
|
||||||
int socket_service;
|
int socket_service;
|
||||||
int lg_adresse = sizeof (struct sockaddr_in);
|
socklen_t lg_adresse = sizeof (struct sockaddr_in);
|
||||||
struct sockaddr_in adresse;
|
struct sockaddr_in adresse;
|
||||||
pthread_t pthread_id;
|
pthread_t pthread_id;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user