Oleg Synelnykov
198bdd77d0
Remove -Wno-unused-parameter
...
Introduced UNUSED macro with cast to void in commoh.h for internal
use. Used cast to void directly in those files which do not
include common.h. Although this change doesn't fix semantic issues
with unused function parameters, it does explicitly mark all those
places, which might require attention in future.
2020-03-31 17:37:12 +03:00
Dmitry Podgorny
562a06425b
Unify coding style
...
@sjaeckel integrated clang-format with formal coding style. Run his
script and commit changes.
There are pros and cons of this commit.
Mixed coding style is a "broken window". A good single style simplifies
reading and writing code.
On the other hand, this is a big change which will lead to conflicts.
2020-01-31 01:16:50 +02:00
Steffen Jaeckel
abd1b08a97
trim trailing spaces
2020-01-31 01:14:32 +02:00
Dmitry Podgorny
15e7032f0d
examples/bot: handle quit message
2017-07-05 19:40:25 +03:00
Alexander Krotov
443b4d3116
Use more variables in bot.c message_handler()
...
to avoid calling the same function twice.
2017-06-20 01:38:53 +03:00
Dmitry Podgorny
b0a1842a53
examples/bot: fix memory leaks and use stanza helpers
2016-08-30 15:32:10 +03:00
Dmitry Podgorny
a3da77b8f6
stanza: return const char* for non allocated strings
...
If interface function returns char* the result must be freed with
xmpp_free().
In case of const char* the result must not be changed by user. Also, the
result is valid only during stanza lifetime.
2016-04-27 11:56:50 +00:00
Tusharsb
7bbfd00344
Making bot.c compatible to C++
...
By this small type casting change, I am able to compile bot.c with both ``gcc`` as well as with ``g++``
I am now able to use bot.c in my c++ programs
2015-12-02 14:53:52 +05:30
Dmitry Podgorny
a54def3e92
examples/bot: fixed memory leak
2015-10-23 00:40:13 +03:00
Tristan Le Guern
d460a5eb16
Convert bot.c to the new helpers
2015-10-20 16:26:43 +03:00
Dmitry Podgorny
64d65b3aed
examples: mention about xmpp_conn_set_flags()
...
xmpp_conn_set_flags() provides features that people sometimes look for.
Adding comment to examples will simplify the search.
2015-10-20 14:36:43 +03:00
Dariusz Dwornikowski
71f75b2e2e
Closes #31
2014-10-23 08:44:52 +02:00
Dmytro Podgornyi
9af64e244e
examples/bot: removed non-standard strcpy_s/strcat_s
...
strncpy/strncat must be used instead. But in this case they don't make
sense, because string has enough space.
2014-08-08 18:27:02 +03:00
h0ru5
4111cf772a
patch to avoid crash when messages without type are sent
2014-01-06 22:46:16 +01:00
Jack Moffitt
370a371800
Dual licensed libstrophe under MIT and GPLv3.
...
Updated copyright headers.
2009-06-15 15:26:10 -06:00
Dustin Sallings
2b661bd1f4
Handle a case where the query has no namespace.
...
When I tried this sample code, it failed due to a NULL namespace being
returned (and a later strdup(NULL)).
2009-04-14 13:11:33 -07:00
Jack Moffitt
1ac33269ac
Removed unneeded variables from bot.c.
2009-04-14 13:47:20 -06:00
Matthew Wild
bc5265f6c9
Bot shouldn't reply to message type="error", and also fixed comment.
2008-09-18 03:36:19 +00:00
Jack Moffitt
3b47afaac9
Fix warnings and line endings from previous SRV commit. Get rid of domain parameter of xmpp_connect_client(). Remove usused handler.c helper left over from previous commit.
2008-07-03 05:20:59 +00:00
Jack Moffitt
a1a9328698
Added bot example given to us by Matthew Wild <mwild1@gmail.com>.
2008-07-03 02:48:32 +00:00