aboutsummaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'client.c')
-rw-r--r--client.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/client.c b/client.c
index 830ef19..a7a5472 100644
--- a/client.c
+++ b/client.c
@@ -90,8 +90,8 @@ int main(int argc, char **argv) {
break;
case CMD_CAPS:
- cmd.data[0] = 1;
- cmd.data[1] = ident;
+ cmd.data[0] = htonl(1);
+ cmd.data[1] = htonl(ident);
for(i = 0; i < 6 * sizeof(int); i++) {
if(argc > 1 && i < len_uid) {
cmd.string[i+8] = argv[1][i];
@@ -99,9 +99,6 @@ int main(int argc, char **argv) {
cmd.string[i+8] = '\0';
}
}
- for(i = 0; i < 8; i++) {
- cmd.data[i] = htonl(cmd.data[i]);
- }
sendto(sock, &cmd, sizeof(cmd), 0, (struct sockaddr *) &remote, rlen);
break;