Bind to localhost.

pull/1/head
Peter Zotov 2011-02-15 19:47:57 +03:00
rodzic db0a8d3ddf
commit ca668a5a5f
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -13,6 +13,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "gdb-remote.h"
#include "stlink-hw.h"
@ -57,7 +58,7 @@ int serve(struct stlink* sl, int port) {
struct sockaddr_in serv_addr = {0};
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = INADDR_ANY;
serv_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
serv_addr.sin_port = htons(port);
if(bind(sock, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) {