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
a65679dd72
conn: removed unused fields from xmpp_conn_t
2016-04-26 13:03:16 +00:00
Dmitry Podgorny
211748e65a
Replace bit mask hex values with shifts
2016-04-26 13:01:22 +00:00
Dmitry Podgorny
4c0c12343f
sha1: moved SHA1HANDSOFF definition
2016-04-22 21:30:17 +00:00
Dmitry Podgorny
96873984b2
conn: handle stream tag properly
...
If `id == NULL' there were two issues: use-after-free error or
logging wrong error description.
Also open stream handler was called even when error occured and
conn object was disconnected.
2016-04-22 21:04:29 +00:00
Dmitry Podgorny
b06599963b
conn: make xmpp_conn_t object reusable
...
Disconnected xmpp_conn_t object can be connected again. The object
is reset before connection, but the next fields remain untoucned:
* all handlers
* flags
* jid and password
Main use-case of this change is reconnect when an error occurs.
2016-04-22 20:52:36 +00:00
Dmitry Podgorny
ab80d72518
tls/openssl: handle SSL_shutdown() properly
...
Handle SSL_ERROR_WANT_READ/WRITE and return value 0.
2016-04-19 19:57:52 +00:00
Dmitry Podgorny
ba7422c893
tls/openssl: be more verbose
...
Log non-recoverable errors. The openssl error queue can contain useful
information.
2016-04-19 18:21:27 +00:00
Dmitry Podgorny
4b444ea699
tls/openssl: fixed indentation
2016-04-19 16:33:47 +00:00
Dmitry Podgorny
96dc61c772
sock: use sock_close() instead of close()
2016-04-16 20:19:16 +00:00
Andrey (Stanson) Kozin
f5c2c81142
Added conn_send_queue_purge() function.
...
Function frees all data and clean send queue in
xmpp_conn_release()
xmpp_connect_client()
xmpp_connect_component()
2016-04-15 16:08:24 +00:00
Dmitry Podgorny
838ed493a3
updated README.markdown
2016-04-15 15:56:22 +00:00
Dmitry Podgorny
9d7b3394e7
Makefile.am: updated EXTRA_DIST
...
'make dist' prepares complete tarballs now.
2016-04-15 15:51:12 +00:00
Dmitry Podgorny
9e4e274c4d
updated examples/README.md
2016-04-14 15:23:38 +00:00
Tusharsb
e3b9fa1e53
tips for compiling example code
...
Me and a few more users (at
https://groups.google.com/forum/#!topic/strophe/sPw7-Vpszxs ) were struggling
to compile example files. I think this readme file will help others as well.
2016-04-14 14:20:38 +00:00
Dmitry Podgorny
85bf3f4241
conn: don't set flag in xmpp_conn_disable_tls() directly
...
Instead, use xmpp_conn_set_flags() interface to force all necessary
checks.
2016-04-13 12:43:03 +00:00
Dmitry Podgorny
6d70bf4b0d
tests/sha1: fixed indentation
2016-04-13 12:40:42 +00:00
Dmitry Podgorny
3aafeef215
res_query_dump: added comment with printable symbols
2016-04-13 12:38:53 +00:00
Dmitry Podgorny
e60895087e
event: let event loop start after xmpp_stop()
2016-04-13 10:25:15 +00:00
Dmitry Podgorny
b169c0a91e
conn: refactore connect functions
...
Common code is moved to a separated function.
2016-04-12 20:19:16 +00:00
Dmitry Podgorny
968cb7dcdf
conn: fixed indentation
2016-04-12 20:07:58 +00:00
Dmitry Podgorny
367aeb5844
conn: don't set tcp keepalives for disconnected connection
...
In XMPP_CONN_DISCONNECTED state conn->sock is undefined.
2016-04-08 18:17:07 +00:00
Dmitry Podgorny
5518a9e10a
sock: refactore tcp keepalive setting
...
- Leave default number of keepalive probes rather than hardcoded value
- QNX and OSX use TCP_KEEPALIVE instead of TCP_KEEPIDLE
- QNX doesn't have TCP_KEEPINTVL
2016-04-08 18:12:48 +00:00
Andrey (Stanson) Kozin
6c1c2a86f8
TCP keepalive setting support
2016-04-08 16:40:56 +00:00
Chih-Wei Chen
cb79f5c10b
Revert "Added expat submodule for tracking vendor releases."
...
This reverts commit 24abd94a82 .
Signed-off-by: Chih-Wei Chen <changeway@gmail.com >
2016-03-16 16:38:09 +08:00
Dmitry Podgorny
b7e308d057
Implemented resolver to replace sock_srv_lookup()
2016-02-20 00:15:08 +02:00
Andrey (Stanson) Kozin
714b2f9c03
Free send queue on connection release
2016-02-06 00:10:21 +00:00
Dmitry Podgorny
a7c18ba6c7
autotools: choose correct library for res_query()
...
See #72 for further information.
2016-02-05 23:37:55 +00:00
Dmitry Podgorny
fc82aaeef2
git: added vim's swp files to .gitignore
2016-02-05 22:46:36 +00:00
Dmitry Podgorny
c291513663
Makefile: remove unused src/thread.c
...
See #72 for further information.
2016-02-05 21:58:00 +00:00
Rafael Sadowski
a413c68e52
fix: generated syntax errors on BSD's SH(1)
2016-02-05 21:43:34 +00:00
Dmitry Podgorny
5b41247bac
rand: remove sizeof(uint8_t) because it's always 1
2016-01-10 13:05:30 +02:00
vf
fc563272fe
Fix for MSVC
2016-01-09 17:57:32 +03:00
Dmitry Podgorny
38545af533
parser/expat: reduce code duplication
2015-12-21 13:46:51 +02:00
James Booth
6f612d4f4d
Add -no-undefined to LDFLAGS
2015-12-14 00:28:37 +00:00
Dmitry Podgorny
a1bc5e82cf
sha1: don't make in-place operations
...
SHA1HANDSOFF makes SHA1_Transform() use an internal buffer.
2015-12-06 11:11:52 +02:00
Dmitry Podgorny
98c8afd5fc
tests: updated SHA1 test
...
* added new testcase with 128 'a'
* added check that SHA1 functions don't change original strings
2015-12-04 09:57:09 +02:00
Dmitry Podgorny
cff4a4cd71
Merge pull request #76 from Tusharsb/patch-2
...
Making bot.c compatible to C++
2015-12-02 11:41:58 +02: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
01af2deed9
conn: fixed memory leak
...
Memory leak appeared when xmpp_connect_client() was called for a
connection more than once. In this case conn->domain wasn't freed.
2015-10-23 01:28:19 +03:00
Dmitry Podgorny
a54def3e92
examples/bot: fixed memory leak
2015-10-23 00:40:13 +03: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
31582cac92
ChangeLog: added new stanza API
2015-10-20 21:06:35 +03:00
Dmitry Podgorny
c012f20c99
stanza: handle EMEM in xmpp_stanza_set_name()
2015-10-20 16:26:43 +03:00
Tristan Le Guern
d460a5eb16
Convert bot.c to the new helpers
2015-10-20 16:26:43 +03:00
Tristan Le Guern
3a56d68f47
Convert active.c to the new helpers
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