Commit 34fa2db9 authored by Dafydd Harries's avatar Dafydd Harries

stun client: allow overriding server on command line

darcs-hash:20070105210221-c9803-624f95b4665afe14cab69cad864c224466ccb461.gz
parent 0e0f9d76
......@@ -7,7 +7,7 @@
#include <stun.h>
const gchar *server = "stun.fwdnet.net";
static gchar *server = "stun.fwdnet.net";
const guint port = 3478;
static gboolean
......@@ -24,7 +24,7 @@ resolve (const gchar *name, struct hostent *ret)
}
int
main (void)
main (int argc, char **argv)
{
struct hostent he;
struct sockaddr_in sin;
......@@ -35,6 +35,9 @@ main (void)
StunMessage *msg;
StunAttribute **attr;
if (argc > 1)
server = argv[1];
if (!resolve(server, &he))
{
g_debug ("failed to resolve %s\n", server);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment