Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EionRobb/pidgin-opensteamworks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Harker <jonathan@catalyst.net.nz>2016-04-08 02:57:28 +0300
committerJonathan Harker <jonathan@catalyst.net.nz>2016-04-08 03:18:34 +0300
commit440427abaf619a243d79d5f6edcb358f33be07b4 (patch)
tree3811cca3ee98a70504e8052aa11097ab16db51bf
parentd6ed4654c22e25244787a3f96dccbecf7d0a3f52 (diff)
Lint: unused variables, socket write error checks.
-rw-r--r--steam-mobile/libsteam.c4
-rw-r--r--steam-mobile/steam_connection.c14
2 files changed, 14 insertions, 4 deletions
diff --git a/steam-mobile/libsteam.c b/steam-mobile/libsteam.c
index 46483ba..8c301cb 100644
--- a/steam-mobile/libsteam.c
+++ b/steam-mobile/libsteam.c
@@ -984,8 +984,8 @@ steam_get_conversations_cb(SteamAccount *sa, JsonObject *obj, gpointer user_data
JsonObject *session = json_array_get_object_element(message_sessions, index);
gint64 accountid_friend = json_object_get_int_member(session, "accountid_friend");
gint64 last_message = json_object_get_int_member(session, "last_message");
- gint64 last_view = json_object_get_int_member(session, "last_view");
- gint64 unread_message_count = json_object_get_int_member(session, "unread_message_count");
+ //gint64 last_view = json_object_get_int_member(session, "last_view");
+ //gint64 unread_message_count = json_object_get_int_member(session, "unread_message_count");
if (last_message > last_message_stored_timestamp) {
steam_get_offline_history(sa, steam_accountid_to_steamid(accountid_friend), last_message_stored_timestamp);
diff --git a/steam-mobile/steam_connection.c b/steam-mobile/steam_connection.c
index f3c4cc6..5b9998d 100644
--- a/steam-mobile/steam_connection.c
+++ b/steam-mobile/steam_connection.c
@@ -355,9 +355,14 @@ static void steam_post_or_get_connect_cb(gpointer data, gint source,
steamcon->fd = source;
- /* TODO: Check the return value of write() */
len = write(steamcon->fd, steamcon->request->str,
steamcon->request->len);
+ if (len != steamcon->request->len)
+ {
+ purple_debug_error("steam", "post_or_get_connect failed to write request\n");
+ steam_fatal_connection_cb(steamcon);
+ return;
+ }
steamcon->input_watcher = purple_input_add(steamcon->fd,
PURPLE_INPUT_READ,
steam_post_or_get_readdata_cb, steamcon);
@@ -373,9 +378,14 @@ static void steam_post_or_get_ssl_connect_cb(gpointer data,
purple_debug_info("steam", "post_or_get_ssl_connect_cb\n");
- /* TODO: Check the return value of write() */
len = purple_ssl_write(steamcon->ssl_conn,
steamcon->request->str, steamcon->request->len);
+ if (len != steamcon->request->len)
+ {
+ purple_debug_error("steam", "post_or_get_ssl_connect failed to write request\n");
+ steam_fatal_connection_cb(steamcon);
+ return;
+ }
purple_ssl_input_add(steamcon->ssl_conn,
steam_post_or_get_ssl_readdata_cb, steamcon);
}