|
From: <ka...@us...> - 2010-08-16 13:23:30
|
Revision: 383
http://libyahoo2.svn.sourceforge.net/libyahoo2/?rev=383&view=rev
Author: kay21s
Date: 2010-08-16 13:23:19 +0000 (Mon, 16 Aug 2010)
Log Message:
-----------
Fix up warnings
Modified Paths:
--------------
trunk/libyahoo2/src/autoresponder.c
trunk/libyahoo2/src/libyahoo2.c
trunk/libyahoo2/src/sample_client.c
trunk/libyahoo2/src/yahoo2.h
trunk/libyahoo2/src/yahoo_httplib.h
Modified: trunk/libyahoo2/src/autoresponder.c
===================================================================
--- trunk/libyahoo2/src/autoresponder.c 2010-08-16 01:14:42 UTC (rev 382)
+++ trunk/libyahoo2/src/autoresponder.c 2010-08-16 13:23:19 UTC (rev 383)
@@ -745,7 +745,7 @@
}
if(buff[0])
- print_message((buff));
+ print_message(("%s", buff));
}
static void ext_yahoo_got_webcam_image(int id, const char *who,
@@ -970,7 +970,7 @@
}
ylad->status = YAHOO_STATUS_OFFLINE;
- print_message((buff));
+ print_message(("%s", buff));
yahoo_logout();
/* poll_loop=0; */
}
@@ -1155,7 +1155,7 @@
"Yahoo read error: Server closed socket");
if(buff[0])
- print_message((buff));
+ print_message(("%s", buff));
}
}
Modified: trunk/libyahoo2/src/libyahoo2.c
===================================================================
--- trunk/libyahoo2/src/libyahoo2.c 2010-08-16 01:14:42 UTC (rev 382)
+++ trunk/libyahoo2/src/libyahoo2.c 2010-08-16 13:23:19 UTC (rev 383)
@@ -3050,6 +3050,8 @@
}
}
+/* DEFINED FOR TEST
+
static void traverse_cat_list(YList *list, int level)
{
int i;
@@ -3078,6 +3080,7 @@
list = list->next;
}
}
+*/
static YList *find_room_category(YList *list, int cat_id)
{
@@ -3245,9 +3248,6 @@
int length;
struct yahoo_post_data *yad;
struct yahoo_input_data *new_yid;
- struct yahoo_packet *pkt;
- struct yahoo_data *yd = yid->yd;
- int id = yd->client_id;
char *judge;
http_data data;
Modified: trunk/libyahoo2/src/sample_client.c
===================================================================
--- trunk/libyahoo2/src/sample_client.c 2010-08-16 01:14:42 UTC (rev 382)
+++ trunk/libyahoo2/src/sample_client.c 2010-08-16 13:23:19 UTC (rev 383)
@@ -878,7 +878,7 @@
}
if(buff[0])
- print_message((buff));
+ print_message(("%s", buff));
}
static void ext_yahoo_got_webcam_image(int id, const char *who,
@@ -1087,7 +1087,7 @@
}
ylad->status = YAHOO_STATUS_OFFLINE;
- print_message((buff));
+ print_message(("%s", buff));
yahoo_logout();
poll_loop=0;
}
@@ -1291,7 +1291,7 @@
"Yahoo read error: Server closed socket");
if(buff[0])
- print_message((buff));
+ print_message(("%s", buff));
}
}
@@ -1611,9 +1611,11 @@
yahoo_get_chatrooms(ylad->id, roomid);
} else if(!strncasecmp(cmd, "CHR", strlen("CHR"))) {
int roomid;
- void *ext_data;
+ void *ext_data = NULL;
+ YList *list;
+
roomid = atoi(copy);
- YList *list = yahoo_get_chat_room_list(ylad->id, roomid, ext_data);
+ list = yahoo_get_chat_room_list(ylad->id, roomid, ext_data);
if(list) {
if(roomid == 0)
traverse_cat_list(list, 0);
Modified: trunk/libyahoo2/src/yahoo2.h
===================================================================
--- trunk/libyahoo2/src/yahoo2.h 2010-08-16 01:14:42 UTC (rev 382)
+++ trunk/libyahoo2/src/yahoo2.h 2010-08-16 13:23:19 UTC (rev 383)
@@ -136,8 +136,10 @@
void yahoo_conference_logoff(int id, const char *from, YList *who,
const char *room);
-/* Get a list of chatrooms */
+/* Get list of chat rooms or categories from the server */
void yahoo_get_chatrooms(int id, int chatroomid);
+/* Get cached chat room list or category list */
+ const YList *yahoo_get_chat_room_list(int id, int roomid, void *extra_data);
/* join room with specified roomname and roomid */
void yahoo_chat_logon(int id, const char *from, const char *room,
const char *roomid, const char *country, const char *language);
Modified: trunk/libyahoo2/src/yahoo_httplib.h
===================================================================
--- trunk/libyahoo2/src/yahoo_httplib.h 2010-08-16 01:14:42 UTC (rev 382)
+++ trunk/libyahoo2/src/yahoo_httplib.h 2010-08-16 13:23:19 UTC (rev 383)
@@ -41,6 +41,10 @@
void yahoo_http_head(int id, const char *url, const char *cookies,
int size, char *payload, yahoo_get_fd_callback callback,
void *data);
+ char *yahoo_http_get_header_value(http_data, char *);
+ void yahoo_get_http_data(http_data);
+ void yahoo_set_http_data(char *, int, http_data *);
+ void yahoo_free_http_data(http_data *);
#ifdef __cplusplus
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|