summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2009-03-11 03:03:25 +0100
committerGravatar Nikias Bassen2009-03-11 03:03:25 +0100
commitd7122e75ef6f28764630714d4720f98b9050d5ef (patch)
treeb31afd04346067e6d01c47fe94f6117e945b3a2b
parentae400d0e6b5061802ace123fc26a56c2fb669bb4 (diff)
downloadusbmuxd-d7122e75ef6f28764630714d4720f98b9050d5ef.tar.gz
usbmuxd-d7122e75ef6f28764630714d4720f98b9050d5ef.tar.bz2
bug fix for connect_socket function
-rw-r--r--sock_stuff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sock_stuff.c b/sock_stuff.c
index 3d11a27..cdc39d1 100644
--- a/sock_stuff.c
+++ b/sock_stuff.c
@@ -173,7 +173,7 @@ int connect_socket(const char *addr, uint16_t port)
memset((void *)&saddr, 0, sizeof(saddr));
saddr.sin_family = AF_INET;
- saddr.sin_addr.s_addr = (uint32_t)hp->h_addr;
+ saddr.sin_addr.s_addr = *(uint32_t*)hp->h_addr;
saddr.sin_port = htons(port);
if (connect(sfd, (struct sockaddr*)&saddr, sizeof(saddr)) < 0) {