Dmitry Podgorny
a50d706bcd
stanza: added helpers for particular stanzas
...
These are wrappers for message, iq and presence stanzas.
2016-04-26 19:19:51 +00:00
Dmitry Podgorny
ca7af9c837
Fixed indentation and typos
2016-04-26 19:19:51 +00:00
Dmitry Podgorny
2aea1a627c
stanza: avoid copy-paste in 'get' functions
2015-10-21 02:13:55 +03:00
Dmitry Podgorny
e475ca13ea
stanza: handle errors better
...
* Free memory on error in xmpp_stanza_set_attribute()
* Handle memory allocation error in xmpp_stanza_set_text()
2015-10-21 02:11:03 +03:00
Dmitry Podgorny
c012f20c99
stanza: handle EMEM in xmpp_stanza_set_name()
2015-10-20 16:26:43 +03:00
Tristan Le Guern
9de0293405
Implement xmpp_stanza_reply()
...
This function creates a copy of the given stanza minus its children and
set the “to” attribute with the value of the original “from”.
2015-10-20 16:26:43 +03:00
Tristan Le Guern
21f742f888
Implement xmpp_stanza_del_attribute()
2015-10-20 16:26:43 +03:00
Tristan Le Guern
0d4bcc0228
Extract the copy loop into its own function
...
It will help reduce code duplication for xmpp_stanza_copy
2015-10-20 16:26:43 +03:00
Tristan Le Guern
90a595f8ef
Implements helpers for to and from attributes
...
xmpp_stanza_{get,set}_{from,to}
2015-10-20 15:22:20 +03:00
Codewalker
e33a98e498
Streamline xmpp_stanza_to_text for the namespace patch by following XML
...
namespace scoping guidelines and not outputting the xmlns attribute in
contexts where it can be inferred from the parent element.
2015-01-23 11:11:23 -06:00
Dariusz Dwornikowski
71f75b2e2e
Closes #31
2014-10-23 08:44:52 +02:00
James Booth
15650f16b9
Revert "Fixed a potential buffer overflow in xmpp_stanza_to_text when the stanza length was greater than the default buffer size of 1024. Tested on Windows only."
...
This reverts commit 4b194b98cf .
2014-04-30 21:43:50 +01:00
Sharjeel Aziz
4b194b98cf
Fixed a potential buffer overflow in xmpp_stanza_to_text when the stanza length was greater than the default buffer size of 1024. Tested on Windows only.
2013-07-31 10:33:52 -04:00
Alexandre Erwin Ittner
c0b1e5b7fe
Fix escaping of XML text and attributes
...
There was a bug in xmpp_send which caused XML special characters to be
sent to the server verbatim, implying in invalid stanzas and making the
server drop the connection. This commit fixed the bug escaping such
characters with the usual rules.
Bugs: The code now do several (de)allocation operations in every send,
this may have a negative effect on performance when used with slow
memory managers.
License: This code is distributed under the same license used by strophe
(i.e., GPLv3 or MIT).
2012-09-23 17:18:53 -03:00
Jack Moffitt
fc3d025c7f
Fix compiler warning.
2012-02-07 22:57:46 -07:00
Jack Moffitt
370a371800
Dual licensed libstrophe under MIT and GPLv3.
...
Updated copyright headers.
2009-06-15 15:26:10 -06:00
Jack Moffitt
3fd7515dcf
Abstracted XML parser library and switched to autotools building.
...
expat is still the default parser, but libxml2 can also be used
via an option to the configure script. New parsers can easily be
added by implementing a parser_foo.c that uses the interface defined
in parser.h.
2009-04-14 13:47:20 -06:00
Matthew Wild
fddd5f1245
Fix for refcount handling in stanzas, by Jack.
2008-09-18 04:13:29 +00:00
Jack Moffitt
2befeee9e5
Added two new api functions, xmpp_stanza_is_text() and xmpp_stanza_is_tag() to determine the type of stanza.
2008-08-26 04:39:19 +00:00
Jack Moffitt
1054c74c4a
Fix xmpp_stanza_get_text() to work on text stanzas, and add xmpp_stanza_get_text_ptr() to optimize for data translation.
2008-08-26 04:30:05 +00:00
Jack Moffitt
9454c8f29a
Replace last patch with new patch that does same thing better. This new method adds xmpp_stanza_get_child_by_ns() to the API. Implementation and copyright assigned to us by Matthew Wild <mwild1@gmail.com>.
2008-07-03 02:46:24 +00:00
Jack Moffitt
9c49b16554
Fix examples to use new API and lots of compiler warnings.
2008-07-02 23:17:27 +00:00
Jack Moffitt
65a174ee7e
Most public API points are now documented.
2008-06-24 14:43:54 +00:00
Jack Moffitt
b6027cfd7f
Updated copyright years and fixed LLC typo.
2008-06-19 22:33:13 +00:00
James Canete
1f453d2ecf
Add schannel support (win32 only)
...
Fix a couple compile warnings.
Extend features timeout to 5 seconds.
2007-11-05 02:30:04 +00:00
James Canete
f45380bb23
Added OpenSSL support.
...
Added win32-specific srv lookup support.
Extend session timeout to 15 seconds.
2007-09-05 20:01:24 +00:00
Jack Moffitt
c52d0aaa28
Add new snprintf/vsnprintf implementation. This should fix the compability
...
problems between Win32 (with its broken implementation) and the standard
stdio API. Also fixed a bug in debug output where long messages got
truncated to 1023 chars, and in xmpp_stanza_to_text where long stanzas
got truncated by one character.
2006-01-21 00:26:40 +00:00
Jack Moffitt
359c47ffdc
Another pass at C++ification.
2005-08-02 20:18:14 +00:00
Jack Moffitt
74d8b50d60
Add error returns to stanza functions.
2005-07-29 19:24:59 +00:00
Ralph Giles
76e0c6a4b3
Add the 'libstrophe' name to the copyright headers.
2005-06-15 16:58:11 +00:00
Jack Moffitt
17feefe78a
More minor win32 build fixes. The only linking problem is now expat.lib.
2005-06-14 23:27:58 +00:00
Jack Moffitt
e6fa890d3d
Minor fixes for Win32 build. It now builds, but doesn't link.
2005-06-14 22:35:15 +00:00
Ralph Giles
72699eff45
Rename xmpp.h to strophe.h and apply the name changes to the internal
...
header multiple include protection.
2005-06-14 14:25:42 +00:00
Ralph Giles
f27235b862
Move the xmpp library to its new name.
2005-06-14 14:10:31 +00:00