URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [or1ksim/] [debug/] [gdbcomm.c] - Diff between revs 1748 and 1751
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 1748 |
Rev 1751 |
Line 31... |
Line 31... |
/* System includes */
|
/* System includes */
|
#include <stdlib.h>
|
#include <stdlib.h>
|
#include <unistd.h>
|
#include <unistd.h>
|
#include <stdio.h>
|
#include <stdio.h>
|
#include <sys/poll.h>
|
#include <sys/poll.h>
|
|
#include <sys/types.h>
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
#include <fcntl.h>
|
#include <fcntl.h>
|
#include <netdb.h>
|
#include <netdb.h>
|
#include <netinet/tcp.h>
|
#include <netinet/tcp.h>
|
#include <errno.h>
|
#include <errno.h>
|
|
|
Line 109... |
Line 112... |
close (sockfd);
|
close (sockfd);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
/* The server should also be non blocking. Get the current flags. */
|
/* The server should also be non blocking. Get the current flags. */
|
if (fcntl (sockfd, F_GETFL, &flags) < 0)
|
flags = fcntl (sockfd, F_GETFL, flags);
|
|
if (flags < 0)
|
{
|
{
|
sprintf (sTemp, "Unable to get flags for socket %d", sockfd);
|
sprintf (sTemp, "Unable to get flags for socket %d", sockfd);
|
perror (sTemp);
|
perror (sTemp);
|
close (sockfd);
|
close (sockfd);
|
return 0;
|
return 0;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.