Skip to content

Commit

Permalink
[nasa/nos3#100] Commented out unnecessary sim/libsocket prints;
Browse files Browse the repository at this point in the history
  • Loading branch information
jlucas9 committed Mar 22, 2023
1 parent d4f16e8 commit 52cf0d0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions sim/src/libsocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ int32_t socket_create(socket_info_t* socket_info)
// Assign values to the socket_info structure
socket_info->sockfd = ret;
socket_info->created = true;
printf("socket_info->sockfd = %d\n",socket_info->sockfd);
printf("socket_info->created = %d\n",socket_info->created);
//OS_printf("socket_info->sockfd = %d\n",socket_info->sockfd);
//OS_printf("socket_info->created = %d\n",socket_info->created);

// Bind server sockets to localhost and port number
if(socket_info->category==server || socket_info->type==dgram)
Expand All @@ -97,7 +97,7 @@ int32_t socket_create(socket_info_t* socket_info)

// Assign values to the socket_info structure
socket_info->bound = true;
printf("socket_info->bound = %d\n",socket_info->bound);
//OS_printf("socket_info->bound = %d\n",socket_info->bound);
}

// Make socket non-blocking?
Expand Down Expand Up @@ -152,7 +152,7 @@ int32_t socket_listen(socket_info_t* socket_info)

// Assign values to the socket_info structure
socket_info->listening = true;
printf("socket_info->listening = %d\n",socket_info->listening);
//OS_printf("socket_info->listening = %d\n",socket_info->listening);

return status;
}
Expand Down Expand Up @@ -206,8 +206,8 @@ int32_t socket_accept(socket_info_t* socket_info)
// Assign values to the socket_info structure
socket_info->sockfd = ret;
socket_info->connected = true;
printf("socket_info->sockfd = %d\n",socket_info->sockfd);
printf("socket_info->connected = %d\n",socket_info->connected);
//OS_printf("socket_info->sockfd = %d\n",socket_info->sockfd);
//OS_printf("socket_info->connected = %d\n",socket_info->connected);

return status;
}
Expand Down Expand Up @@ -273,7 +273,7 @@ int32_t socket_connect(socket_info_t* socket_info, char* remote_ip_address, int
}
else
{
printf("errno = %d\n",error_num);
OS_printf("errno = %d\n",error_num);
status = SOCKET_CONNECT_ERR;
return status;
}
Expand Down Expand Up @@ -327,14 +327,14 @@ int32_t socket_send(socket_info_t* socket_info, uint8_t* buffer, size_t buflen,
ret = sendto(socket_info->sockfd, (void*)buffer, buflen, 0, (struct sockaddr *)&remote_sockaddr , sizeof(remote_sockaddr));
if(ret == -1)
{
printf("socket_send: sendto returned error %d \n", ret);
OS_printf("socket_send: sendto returned error %d \n", ret);
status = SOCKET_SEND_ERR;
return status;
}

if(ret != (int) buflen)
{
printf("socket_send: sendto sent only %d out of %d bytes! \n", ret, buflen);
OS_printf("socket_send: sendto sent only %d out of %d bytes! \n", ret, buflen);
}

*bytes_sent = ret;
Expand Down

0 comments on commit 52cf0d0

Please sign in to comment.