projects
/
cascardo
/
chat.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Start supporting discovery
[cascardo/chat.git]
/
tictactoe.c
diff --git
a/tictactoe.c
b/tictactoe.c
index
b57c1b9
..
b774512
100644
(file)
--- a/
tictactoe.c
+++ b/
tictactoe.c
@@
-28,18
+28,14
@@
#include "xmpp.h"
#include "sasl.h"
#include "bind.h"
#include "xmpp.h"
#include "sasl.h"
#include "bind.h"
+#include "disco.h"
static void write_stream (hc_xmpp_t *);
static void
send_message_test (hc_xmpp_t *xmpp)
{
static void write_stream (hc_xmpp_t *);
static void
send_message_test (hc_xmpp_t *xmpp)
{
- iks *msg;
- msg = iks_new ("message");
- iks_insert_attrib (msg, "to", "metal@jabber-br.org");
- iks_insert_cdata (iks_insert (msg, "body"), "pubsub", 0);
- hc_xmpp_send_iks (xmpp, msg);
- iks_delete (msg);
+ hc_xmpp_send_disco_info (xmpp, "");
}
static int
}
static int
@@
-61,6
+57,10
@@
myhook (void *data, int type, iks *stanza)
if (hc_xmpp_status (data) == HC_XMPP_SESSION)
send_message_test (data);
}
if (hc_xmpp_status (data) == HC_XMPP_SESSION)
send_message_test (data);
}
+ else if (!iks_strcmp (ns, HC_XMPP_NS_DISCO_INFO))
+ {
+ hc_xmpp_recv_disco (data, stanza);
+ }
}
else if (!iks_strcmp (iks_name (stanza), "stream:features"))
{
}
else if (!iks_strcmp (iks_name (stanza), "stream:features"))
{