]> git.decadent.org.uk Git - ap-utils.git/blobdiff - src/ap-auth.c
Update config.{sub,guess} in the right place at build time - closes: #534825
[ap-utils.git] / src / ap-auth.c
index 9b8b95fb35ae6fe487a2bb63019e73dc46cb8eec..9375c3d568cb964207e4055959365e51e9cf4716 100644 (file)
@@ -37,7 +37,6 @@
 
 short ap_type;
 char *community = NULL;
-int sockfd;
 struct in_addr ap_ip;
 
 void usage()
@@ -95,10 +94,8 @@ int main(int argc, char **argv)
     extern int optopt;
     int opt = 0;
     int mode = 0; /* 1 = download, 2 = upload */
-
     FILE *f;
     char *filename = NULL;
-    struct sockaddr_in client;
 
     struct AuthorizedMacTableString {
        unsigned int short Action;
@@ -132,11 +129,6 @@ int main(int argc, char **argv)
     textdomain("ap-utils");
 #endif
 
-    memset(&client, 0, sizeof client);
-    client.sin_family = AF_INET;
-    client.sin_port = INADDR_ANY;
-    client.sin_addr.s_addr = INADDR_ANY;
-
     do {
        opterr = 0;
        switch (opt = getopt(argc, argv, "i:c:d:u:")) {
@@ -174,15 +166,6 @@ int main(int argc, char **argv)
        return 1;
     }
 
-    if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
-       perror(_("Create socket error"));
-       return 1;
-    }
-    if (bind(sockfd, (struct sockaddr *) &client, SIZE) == -1) {
-       perror(_("Bind socket error"));
-       return 1;
-    }
-
     /*
      * Part detecting ap_type (ATMEL AP MIB type) follows.
      * We could use get_mib_details() here with advantage, but it would
@@ -386,8 +369,6 @@ int main(int argc, char **argv)
        return 1;
     }
 
-    close(sockfd);
-
     curr = first;
     while (curr != NULL) {
         curr = curr->next;