|
@@ -949,17 +949,12 @@ main(int argc, char *argv[]) |
|
|
struct sockaddr_in serv; |
|
|
struct sockaddr_in serv; |
|
|
struct sockaddr from; |
|
|
struct sockaddr from; |
|
|
socklen_t fromlen; |
|
|
socklen_t fromlen; |
|
|
int sfd, tmpsfd; |
|
|
|
|
|
|
|
|
int ch, sfd, tmpsfd; |
|
|
unsigned port; |
|
|
unsigned port; |
|
|
|
|
|
|
|
|
bindaddr = htonl(INADDR_ANY); |
|
|
bindaddr = htonl(INADDR_ANY); |
|
|
port = G_GATE_PORT; |
|
|
port = G_GATE_PORT; |
|
|
for (;;) { |
|
|
|
|
|
int ch; |
|
|
|
|
|
|
|
|
|
|
|
ch = getopt(argc, argv, "a:hnp:R:S:v"); |
|
|
|
|
|
if (ch == -1) |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
while ((ch = getopt(argc, argv, "a:hnp:R:S:v")) != -1) { |
|
|
switch (ch) { |
|
|
switch (ch) { |
|
|
case 'a': |
|
|
case 'a': |
|
|
bindaddr = g_gate_str2ip(optarg); |
|
|
bindaddr = g_gate_str2ip(optarg); |
|
|