summaryrefslogtreecommitdiff
path: root/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Yahoo/src/libyahoo2/libyahoo2.cpp')
-rw-r--r--protocols/Yahoo/src/libyahoo2/libyahoo2.cpp30
1 files changed, 14 insertions, 16 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); */