Skip to content
Snippets Groups Projects
Commit 240b2ffa authored by tewk's avatar tewk
Browse files

added pad to slurm_addr type char pad[16 - sizeof ( int16_t ) - sizeof...

added pad to slurm_addr type char pad[16 - sizeof ( int16_t ) - sizeof (uint16_t) - sizeof (uint32_t) ] ;
explictly defined IPPROTO_XXX in socket() call
parent 0168d5e6
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ typedef struct { ...@@ -12,6 +12,7 @@ typedef struct {
int16_t family ; int16_t family ;
uint16_t port ; uint16_t port ;
uint32_t address ; uint32_t address ;
char pad[16 - sizeof ( int16_t ) - sizeof (uint16_t) - sizeof (uint32_t) ] ;
} slurm_addr ; } slurm_addr ;
......
...@@ -163,10 +163,10 @@ extern int _slurm_create_socket ( slurm_socket_type_t type ) ...@@ -163,10 +163,10 @@ extern int _slurm_create_socket ( slurm_socket_type_t type )
switch ( type ) switch ( type )
{ {
case SLURM_STREAM : case SLURM_STREAM :
return _slurm_socket ( AF_INET, SOCK_STREAM, 0 ) ; return _slurm_socket ( AF_INET, SOCK_STREAM, IPPROTO_TCP) ;
break; break;
case SLURM_MESSAGE : case SLURM_MESSAGE :
return _slurm_socket ( AF_INET, SOCK_DGRAM, 0 ) ; return _slurm_socket ( AF_INET, SOCK_DGRAM, IPPROTO_UDP ) ;
break; break;
default : default :
return SLURM_SOCKET_ERROR; return SLURM_SOCKET_ERROR;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment