messi set
This commit is contained in:
parent
5fd1e35411
commit
a8a4caaddb
|
@ -47,7 +47,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
long mtype; // type 3
|
||||
int id;
|
||||
char name_player[MAX_NAME];
|
||||
char *name_player;
|
||||
} player_names_t;
|
||||
|
||||
#endif
|
|
@ -151,7 +151,7 @@ int main(int argc, char *argv[]){
|
|||
semOp(semid, 2, -1);
|
||||
|
||||
player_names_t names; // lo so si possono usare nomi piu chiari ma problema tuo (mi riferisco a te e me futuro)
|
||||
char name[2][MAX_NAME];
|
||||
char *name[2];
|
||||
|
||||
// ricevuta nome primo client
|
||||
if (msgrcv(msgid, &names, sizeof(player_names_t) - sizeof(long), 3, 0) == -1) {
|
||||
|
@ -159,6 +159,7 @@ int main(int argc, char *argv[]){
|
|||
}
|
||||
// name[names.id] = names.name_player;
|
||||
|
||||
|
||||
printfServer("Player ");
|
||||
printf("%s connected\n", name[names.id]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue