summaryrefslogtreecommitdiff
path: root/protocols/Yahoo/src/libyahoo2
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Yahoo/src/libyahoo2')
-rw-r--r--protocols/Yahoo/src/libyahoo2/libyahoo2.cpp30
-rw-r--r--protocols/Yahoo/src/libyahoo2/yahoo2.h4
-rw-r--r--protocols/Yahoo/src/libyahoo2/yahoo2_callbacks.h6
-rw-r--r--protocols/Yahoo/src/libyahoo2/yahoo2_types.h4
-rw-r--r--protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp8
-rw-r--r--protocols/Yahoo/src/libyahoo2/yahoo_httplib.h2
6 files changed, 26 insertions, 28 deletions
diff --git a/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp b/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp
index 1b178f580e..aa365d8631 100644
--- a/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp
+++ b/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp
@@ -131,7 +131,7 @@ struct yahoo_input_data {
struct yahoo_webcam_data *wcd;
struct yahoo_search_state *ys;
- int fd;
+ INT_PTR fd;
enum yahoo_connection_type type;
unsigned char *rxqueue;
@@ -161,7 +161,7 @@ typedef struct {
char *name;
}value_string;
-static int yahoo_send_data(int fd, const char *data, int len);
+static int yahoo_send_data(INT_PTR fd, const char *data, int len);
int yahoo_log_message(char * fmt, ...)
{
@@ -604,7 +604,7 @@ static struct yahoo_input_data * find_input_by_id_and_type(int id, enum yahoo_co
return NULL;
}
-static struct yahoo_input_data * find_input_by_id_and_fd(int id, int fd)
+static struct yahoo_input_data * find_input_by_id_and_fd(int id, INT_PTR fd)
{
YList *l;
LOG(("find_input_by_id_and_fd"));
@@ -1032,7 +1032,7 @@ static void yahoo_packet_free(struct yahoo_packet *pkt)
FREE(pkt);
}
-static int yahoo_send_data(int fd, const char *data, int len)
+static int yahoo_send_data(INT_PTR fd, const char *data, int len)
{
int ret;
int e;
@@ -1606,8 +1606,6 @@ static void yahoo_process_conference(struct yahoo_input_data *yid, struct yahoo_
if (pair->key == 14) /* decline/conf message */
msg = pair->value;
- if (pair->key == 13)
- ;
if (pair->key == 16) /* error */
msg = pair->value;
@@ -3606,7 +3604,7 @@ static void yahoo_process_yab_update(struct yahoo_input_data *yid, struct yahoo_
//YAHOO_CALLBACK(ext_yahoo_got_ping)(yid->yd->client_id, errormsg);
}
-static void _yahoo_webcam_get_server_connected(int fd, int error, void *d)
+static void _yahoo_webcam_get_server_connected(INT_PTR fd, int error, void *d)
{
struct yahoo_input_data *yid = (struct yahoo_input_data *) d;
char *who = yid->wcm->user;
@@ -4266,7 +4264,7 @@ static int yahoo_get_webcam_data(struct yahoo_input_data *yid)
return 0;
}
-int yahoo_write_ready(int id, int fd, void *data)
+int yahoo_write_ready(int id, INT_PTR fd, void *data)
{
struct yahoo_input_data *yid = (struct yahoo_input_data *) data;
int len;
@@ -4502,7 +4500,7 @@ static void yahoo_process_search_connection(struct yahoo_input_data *yid, int ov
}
}
-static void _yahoo_webcam_connected(int fd, int error, void *d)
+static void _yahoo_webcam_connected(INT_PTR fd, int error, void *d)
{
struct yahoo_input_data *yid = (struct yahoo_input_data *) d;
struct yahoo_webcam * wcm = yid->wcm;
@@ -4658,7 +4656,7 @@ static void yahoo_process_webcam_master_connection(struct yahoo_input_data *yid,
static void yahoo_process_webcam_connection(struct yahoo_input_data *yid, int over)
{
int id = yid->yd->client_id;
- int fd = yid->fd;
+ INT_PTR fd = yid->fd;
if (over)
return;
@@ -4678,7 +4676,7 @@ static void (*yahoo_process_connection[])(struct yahoo_input_data *, int over) =
yahoo_process_search_connection
};
-int yahoo_read_ready(int id, int fd, void *data)
+int yahoo_read_ready(int id, INT_PTR fd, void *data)
{
struct yahoo_input_data *yid = (struct yahoo_input_data *) data;
struct yahoo_server_settings *yss;
@@ -4797,7 +4795,7 @@ struct connect_callback_data {
int type;
};
-static void yahoo_connected(int fd, int error, void *data)
+static void yahoo_connected(INT_PTR fd, int error, void *data)
{
struct connect_callback_data *ccd = (struct connect_callback_data *) data;
struct yahoo_data *yd = ccd->yd;
@@ -5140,7 +5138,7 @@ void yahoo_get_list(int id)
}
}
-static void _yahoo_http_connected(int id, int fd, int error, void *data)
+static void _yahoo_http_connected(int id, INT_PTR fd, int error, void *data)
{
struct yahoo_input_data *yid = (struct yahoo_input_data *) data;
if (fd <= 0) {
@@ -6036,12 +6034,12 @@ struct send_file_data {
void *user_data;
};
-static void _yahoo_send_file_connected(int id, int fd, int error, void *data)
+static void _yahoo_send_file_connected(int id, INT_PTR fd, int error, void *data)
{
struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_FT);
struct send_file_data *sfd = (struct send_file_data *) data;
struct yahoo_packet *pkt = sfd->pkt;
- char buff[1024];
+ unsigned char buff[1024];
if (fd <= 0) {
sfd->callback(id, fd, error, sfd->user_data);
@@ -6062,7 +6060,7 @@ static void _yahoo_send_file_connected(int id, int fd, int error, void *data)
buff[2] = 0xc0;
buff[3] = 0x80;
- write(yid->fd, buff, 4);
+ write(yid->fd, (char*)buff, 4);
/* YAHOO_CALLBACK(ext_yahoo_add_handler)(nyd->fd, YAHOO_INPUT_READ); */
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo2.h b/protocols/Yahoo/src/libyahoo2/yahoo2.h
index 475d82b6c3..958e83e472 100644
--- a/protocols/Yahoo/src/libyahoo2/yahoo2.h
+++ b/protocols/Yahoo/src/libyahoo2/yahoo2.h
@@ -183,8 +183,8 @@ void yahoo_get_url_handle(int id, const char *url,
/* these should be called when input is available on a fd */
/* registered by ext_yahoo_add_handler */
/* if these return negative values, errno may be set */
-int yahoo_read_ready(int id, int fd, void *data);
-int yahoo_write_ready(int id, int fd, void *data);
+int yahoo_read_ready(int id, INT_PTR fd, void *data);
+int yahoo_write_ready(int id, INT_PTR fd, void *data);
/* utility functions. these do not hit the server */
enum yahoo_status yahoo_current_status(int id);
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo2_callbacks.h b/protocols/Yahoo/src/libyahoo2/yahoo2_callbacks.h
index b6a01346cb..f8d7eb1ad1 100644
--- a/protocols/Yahoo/src/libyahoo2/yahoo2_callbacks.h
+++ b/protocols/Yahoo/src/libyahoo2/yahoo2_callbacks.h
@@ -62,7 +62,7 @@ typedef enum {
* callback_data - the callback_data passed to the ext_yahoo_connect_async
* function
*/
-typedef void (*yahoo_connect_callback)(int fd, int error, void *callback_data);
+typedef void (*yahoo_connect_callback)(INT_PTR fd, int error, void *callback_data);
/*
@@ -391,7 +391,7 @@ void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_cat_xml)(int id, const char *xml);
* of yahoo_chat_member's) Must be freed by the client
* fd - the socket where the connection is coming from (for tracking)
*/
-void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_join)(int id, const char *me, const char *room, const char *topic, YList *members, int fd);
+void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_join)(int id, const char *me, const char *room, const char *topic, YList *members, INT_PTR fd);
/*
@@ -790,7 +790,7 @@ int YAHOO_CALLBACK_TYPE(ext_yahoo_log)(const char *fmt, ...);
*
* Returns: a tag to be used when removing the handler
*/
-unsigned int YAHOO_CALLBACK_TYPE(ext_yahoo_add_handler)(int id, int fd, yahoo_input_condition cond, void *data);
+unsigned int YAHOO_CALLBACK_TYPE(ext_yahoo_add_handler)(int id, INT_PTR fd, yahoo_input_condition cond, void *data);
/*
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo2_types.h b/protocols/Yahoo/src/libyahoo2/yahoo2_types.h
index e0bcf9498c..245cc118fd 100644
--- a/protocols/Yahoo/src/libyahoo2/yahoo2_types.h
+++ b/protocols/Yahoo/src/libyahoo2/yahoo2_types.h
@@ -403,12 +403,12 @@ struct yahoo_found_contact {
/*
* Function pointer to be passed to http get/post and send file
*/
-typedef void (*yahoo_get_fd_callback)(int id, int fd, int error, void *data);
+typedef void (*yahoo_get_fd_callback)(int id, INT_PTR fd, int error, void *data);
/*
* Function pointer to be passed to yahoo_get_url_handle
*/
-typedef void (*yahoo_get_url_handle_callback)(int id, int fd, int error,
+typedef void (*yahoo_get_url_handle_callback)(int id, INT_PTR fd, int error,
const char *filename, unsigned long size, void *data);
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp b/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp
index c3543917f1..551c64fbe7 100644
--- a/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp
+++ b/protocols/Yahoo/src/libyahoo2/yahoo_httplib.cpp
@@ -67,7 +67,7 @@ extern struct yahoo_callbacks *yc;
extern enum yahoo_log_level log_level;
-int yahoo_tcp_readline(char *ptr, int maxlen, int fd)
+int yahoo_tcp_readline(char *ptr, int maxlen, INT_PTR fd)
{
int n, rc;
char c;
@@ -277,7 +277,7 @@ char *yahoo_xmldecode(const char *instr)
return (str);
}
-typedef void (*http_connected)(int id, int fd, int error);
+typedef void (*http_connected)(int id, INT_PTR fd, int error);
struct callback_data {
int id;
@@ -286,7 +286,7 @@ struct callback_data {
void *user_data;
};
-static void connect_complete(int fd, int error, void *data)
+static void connect_complete(INT_PTR fd, int error, void *data)
{
struct callback_data *ccd = (struct callback_data *) data;
@@ -376,7 +376,7 @@ struct url_data {
void *user_data;
};
-static void yahoo_got_url_fd(int id, int fd, int error, void *data)
+static void yahoo_got_url_fd(int id, INT_PTR fd, int error, void *data)
{
char *tmp=NULL;
char buff[1024];
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo_httplib.h b/protocols/Yahoo/src/libyahoo2/yahoo_httplib.h
index 1698928928..1baea7cea8 100644
--- a/protocols/Yahoo/src/libyahoo2/yahoo_httplib.h
+++ b/protocols/Yahoo/src/libyahoo2/yahoo_httplib.h
@@ -32,7 +32,7 @@ char *yahoo_urlencode(const char *instr);
char *yahoo_urldecode(const char *instr);
char *yahoo_xmldecode(const char *instr);
-int yahoo_tcp_readline(char *ptr, int maxlen, int fd);
+int yahoo_tcp_readline(char *ptr, int maxlen, INT_PTR fd);
void yahoo_http_post(int id, const char *url, const char *cookies, long size,
yahoo_get_fd_callback callback, void *data);
void yahoo_http_get(int id, const char *url, const char *cookies,