Browse Source

mostly useless fixes

master
tonton Th 1 year ago
parent
commit
5e17585bea
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      guinnessd.c

+ 4
- 4
guinnessd.c View File

@ -32,7 +32,7 @@
#include "commands.h"
#include "config.h"
/* Config spécifique serveur */
/* Config specifique serveur */
char *adr_ip = NULL;
int port = 0;
int online = TRUE;
@ -45,7 +45,7 @@ FILE *outerr = NULL;
Elt *clients_list = NULL;
Elt *drinks_list = NULL;
/* Config spécifique connexion des clients */
/* Config specifique connexion des clients */
char *pseudo = NULL;
char *drink = NULL;
char *logout = NULL;
@ -315,7 +315,7 @@ int initiate (int socket_service, userinfos *infos) {
pthread_mutex_lock (&mutex_clients);
if (exist_elt (clients_list, infos->nom)) {
char nick_ok[MAXSTRLEN];
char nick_ok[MAXSTRLEN+1];
snprintf (nick_ok, MAXSTRLEN, "@%s", infos->nom);
snprintf (infos->nom, MAXSTRLEN, "%s", nick_ok);
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 socket_ecoute;
int socket_service;
int lg_adresse = sizeof (struct sockaddr_in);
socklen_t lg_adresse = sizeof (struct sockaddr_in);
struct sockaddr_in adresse;
pthread_t pthread_id;


Loading…
Cancel
Save