aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dcc.c14
-rw-r--r--irc.c3
-rw-r--r--protocols/jabber/iq.c5
-rw-r--r--protocols/jabber/s5bytestream.c16
4 files changed, 32 insertions, 6 deletions
diff --git a/dcc.c b/dcc.c
index d93eef87..cd70c480 100644
--- a/dcc.c
+++ b/dcc.c
@@ -29,6 +29,20 @@
#include <netinet/tcp.h>
#include <regex.h>
+/* Some ifdefs for ulibc (Thanks to Whoopie) */
+#ifndef HOST_NAME_MAX
+#include <sys/param.h>
+#ifdef MAXHOSTNAMELEN
+#define HOST_NAME_MAX MAXHOSTNAMELEN
+#else
+#define HOST_NAME_MAX 255
+#endif
+#endif
+
+#ifndef AI_NUMERICSERV
+#define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */
+#endif
+
/*
* Since that might be confusing a note on naming:
*
diff --git a/irc.c b/irc.c
index e8b08e71..c61e289b 100644
--- a/irc.c
+++ b/irc.c
@@ -29,9 +29,6 @@
#include "ipc.h"
#include "dcc.h"
-#include <regex.h>
-#include <netinet/in.h>
-
static gboolean irc_userping( gpointer _irc, int fd, b_input_condition cond );
GSList *irc_connection_list = NULL;
diff --git a/protocols/jabber/iq.c b/protocols/jabber/iq.c
index 22aa3e7c..eacc85af 100644
--- a/protocols/jabber/iq.c
+++ b/protocols/jabber/iq.c
@@ -611,7 +611,7 @@ xt_status jabber_iq_query_features( struct im_connection *ic, char *bare_jid )
if( ( bud = jabber_buddy_by_jid( ic, bare_jid , 0 ) ) == NULL )
{
/* Who cares about the unknown... */
- imcb_log( ic, "Couldnt find the man: %s", bare_jid);
+ imcb_log( ic, "Couldn't find buddy: %s", bare_jid);
return 0;
}
@@ -625,6 +625,7 @@ xt_status jabber_iq_query_features( struct im_connection *ic, char *bare_jid )
{
imcb_log( ic, "WARNING: Couldn't generate feature query" );
xt_free_node( node );
+ return 0;
}
jabber_cache_add( ic, query, jabber_iq_parse_features );
@@ -647,7 +648,7 @@ xt_status jabber_iq_parse_features( struct im_connection *ic, struct xt_node *no
if( ( bud = jabber_buddy_by_jid( ic, xt_find_attr( node, "from") , 0 ) ) == NULL )
{
/* Who cares about the unknown... */
- imcb_log( ic, "Couldnt find the man: %s", xt_find_attr( node, "from"));
+ imcb_log( ic, "Couldn't find buddy: %s", xt_find_attr( node, "from"));
return 0;
}
diff --git a/protocols/jabber/s5bytestream.c b/protocols/jabber/s5bytestream.c
index 1008f162..15696501 100644
--- a/protocols/jabber/s5bytestream.c
+++ b/protocols/jabber/s5bytestream.c
@@ -25,6 +25,16 @@
#include "sha1.h"
#include <poll.h>
+/* Some ifdefs for ulibc (Thanks to Whoopie) */
+#ifndef HOST_NAME_MAX
+#include <sys/param.h>
+#ifdef MAXHOSTNAMELEN
+#define HOST_NAME_MAX MAXHOSTNAMELEN
+#else
+#define HOST_NAME_MAX 255
+#endif
+#endif
+
struct bs_transfer {
struct jabber_transfer *tf;
@@ -1047,10 +1057,14 @@ gboolean jabber_bs_send_handshake( gpointer data, gint fd, b_input_condition con
{
struct socks5_message socks5_connect;
int msgsize = sizeof( struct socks5_message );
+ int ret;
- if( !jabber_bs_peek( bt, &socks5_connect, msgsize ) )
+ if( !( ret = jabber_bs_peek( bt, &socks5_connect, msgsize ) ) )
return FALSE;
+ if( ret < msgsize )
+ return TRUE;
+
if( !( socks5_connect.ver == 5) ||
!( socks5_connect.cmdrep.cmd == 1 ) ||
!( socks5_connect.atyp == 3 ) ||