Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
5d2f912738
|
@ -50,8 +50,8 @@ int multicastTerminal(struct middleware_arg* arg){
|
|||
=========================================================*/
|
||||
/* 1. On parse la requête */
|
||||
memcpy(&request.flags, buffer, sizeof(char));
|
||||
memcpy(&request.addr, buffer+sizeof(char), sizeof(char)*15);
|
||||
memcpy(&request.port, buffer+sizeof(char)*16, sizeof(unsigned short));
|
||||
memcpy(&request.addr, buffer+sizeof(char), sizeof(in_addr_t));
|
||||
memcpy(&request.port, buffer+sizeof(char)+sizeof(in_addr_t), sizeof(unsigned short));
|
||||
printf("{%s} received: bind_header{flag = %d; addr = %x; port = %d}\n", arg->entity, (int) request.flags, ntohl(request.addr), request. port);
|
||||
|
||||
/* 2. Si mauvais flag (avion) */
|
||||
|
@ -119,7 +119,7 @@ int multicastTerminal(struct middleware_arg* arg){
|
|||
bzero(buffer, MAX_BUF_LEN*sizeof(char));
|
||||
memcpy(buffer, &request.flags, sizeof(char));
|
||||
memcpy(buffer+sizeof(char), &request.addr, sizeof(in_addr_t));
|
||||
memcpy(buffer+sizeof(char)*16, &request.port, sizeof(unsigned short));
|
||||
memcpy(buffer+sizeof(char)+sizeof(in_addr_t), &request.port, sizeof(unsigned short));
|
||||
|
||||
/* 2. On envoie la réponse*/
|
||||
len = sizeof(struct sockaddr_in);
|
||||
|
|
Loading…
Reference in New Issue