trim trailing spaces
This commit is contained in:
committed by
Dmitry Podgorny
parent
3feed16e2e
commit
abd1b08a97
@@ -1,7 +1,7 @@
|
||||
/* active.c
|
||||
** libstrophe XMPP client library -- basic usage example
|
||||
**
|
||||
** Copyright (C) 2005-2009 Collecta, Inc.
|
||||
** Copyright (C) 2005-2009 Collecta, Inc.
|
||||
**
|
||||
** This software is provided AS-IS with no warranty, either express
|
||||
** or implied.
|
||||
@@ -32,7 +32,7 @@ int handle_reply(xmpp_conn_t * const conn,
|
||||
else {
|
||||
query = xmpp_stanza_get_child_by_name(stanza, "query");
|
||||
printf("Active Sessions:\n");
|
||||
for (item = xmpp_stanza_get_children(query); item;
|
||||
for (item = xmpp_stanza_get_children(query); item;
|
||||
item = xmpp_stanza_get_next(item))
|
||||
printf("\t %s\n", xmpp_stanza_get_attribute(item, "jid"));
|
||||
printf("END OF LIST\n");
|
||||
@@ -44,7 +44,7 @@ int handle_reply(xmpp_conn_t * const conn,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void conn_handler(xmpp_conn_t * const conn, const xmpp_conn_event_t status,
|
||||
void conn_handler(xmpp_conn_t * const conn, const xmpp_conn_event_t status,
|
||||
const int error, xmpp_stream_error_t * const stream_error,
|
||||
void * const userdata)
|
||||
{
|
||||
@@ -53,7 +53,7 @@ void conn_handler(xmpp_conn_t * const conn, const xmpp_conn_event_t status,
|
||||
|
||||
if (status == XMPP_CONN_CONNECT) {
|
||||
fprintf(stderr, "DEBUG: connected\n");
|
||||
|
||||
|
||||
/* create iq stanza for request */
|
||||
iq = xmpp_iq_new(ctx, "get", "active1");
|
||||
xmpp_stanza_set_to(iq, "xxxxxxxxx.com");
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* bot.c
|
||||
** libstrophe XMPP client library -- basic usage example
|
||||
**
|
||||
** Copyright (C) 2005-2009 Collecta, Inc.
|
||||
** Copyright (C) 2005-2009 Collecta, Inc.
|
||||
**
|
||||
** This software is provided AS-IS with no warranty, either express
|
||||
** or implied.
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
/* simple bot example
|
||||
**
|
||||
**
|
||||
** This example was provided by Matthew Wild <mwild1@gmail.com>.
|
||||
**
|
||||
** This bot responds to basic messages and iq version requests.
|
||||
@@ -115,7 +115,7 @@ int message_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, void
|
||||
}
|
||||
|
||||
/* define a handler for connection events */
|
||||
void conn_handler(xmpp_conn_t * const conn, const xmpp_conn_event_t status,
|
||||
void conn_handler(xmpp_conn_t * const conn, const xmpp_conn_event_t status,
|
||||
const int error, xmpp_stream_error_t * const stream_error,
|
||||
void * const userdata)
|
||||
{
|
||||
@@ -178,7 +178,7 @@ int main(int argc, char **argv)
|
||||
/* initiate connection */
|
||||
xmpp_connect_client(conn, NULL, 0, conn_handler, ctx);
|
||||
|
||||
/* enter the event loop -
|
||||
/* enter the event loop -
|
||||
our connect handler will trigger an exit */
|
||||
xmpp_run(ctx);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* roster.c
|
||||
** libstrophe XMPP client library -- handler example
|
||||
**
|
||||
** Copyright (C) 2005-2009 Collecta, Inc.
|
||||
** Copyright (C) 2005-2009 Collecta, Inc.
|
||||
**
|
||||
** This software is provided AS-IS with no warranty, either express
|
||||
** or implied.
|
||||
@@ -31,10 +31,10 @@ int handle_reply(xmpp_conn_t * const conn,
|
||||
else {
|
||||
query = xmpp_stanza_get_child_by_name(stanza, "query");
|
||||
printf("Roster:\n");
|
||||
for (item = xmpp_stanza_get_children(query); item;
|
||||
for (item = xmpp_stanza_get_children(query); item;
|
||||
item = xmpp_stanza_get_next(item))
|
||||
if ((name = xmpp_stanza_get_attribute(item, "name")))
|
||||
printf("\t %s (%s) sub=%s\n",
|
||||
printf("\t %s (%s) sub=%s\n",
|
||||
name,
|
||||
xmpp_stanza_get_attribute(item, "jid"),
|
||||
xmpp_stanza_get_attribute(item, "subscription"));
|
||||
@@ -51,7 +51,7 @@ int handle_reply(xmpp_conn_t * const conn,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void conn_handler(xmpp_conn_t * const conn, const xmpp_conn_event_t status,
|
||||
void conn_handler(xmpp_conn_t * const conn, const xmpp_conn_event_t status,
|
||||
const int error, xmpp_stream_error_t * const stream_error,
|
||||
void * const userdata)
|
||||
{
|
||||
@@ -60,7 +60,7 @@ void conn_handler(xmpp_conn_t * const conn, const xmpp_conn_event_t status,
|
||||
|
||||
if (status == XMPP_CONN_CONNECT) {
|
||||
fprintf(stderr, "DEBUG: connected\n");
|
||||
|
||||
|
||||
/* create iq stanza for request */
|
||||
iq = xmpp_iq_new(ctx, "get", "roster1");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user