#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
static char * server = "vespa.holoscopio.com";
static char * username = "pubsub";
static char * password = "pubsub";
static char * pbservice = "pubsub.vespa.holoscopio.com";
-static const char * authed_jid = "vespa";
+static char * authed_jid = "vespa";
iks *
createiq (char *type, char *to, char *qnam, char *xmlns, iks **query)
main (int argc, char **argv)
{
iksparser *parser;
+ int c;
+ while ((c = getopt (argc, argv, "s:u:p:i:a:")) != -1)
+ {
+ switch (c)
+ {
+ case 's':
+ server = optarg;
+ break;
+ case 'u':
+ username = optarg;
+ break;
+ case 'p':
+ password = optarg;
+ break;
+ case 'i':
+ pbservice = optarg;
+ break;
+ case 'a':
+ authed_jid = optarg;
+ break;
+ }
+ }
parser = iks_stream_new ("jabber:client", &parser, hook);
iks_connect_tcp (parser, server, 5222);
while (1)