changeset 17300:176b1ba4bafe

Remove 'flags' from send_im_cb_struct - it was never needed.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Mon, 04 Jun 2007 02:31:02 +0000
parents c6305f8845d8
children 641c96277fa6
files libpurple/protocols/myspace/myspace.c libpurple/protocols/myspace/myspace.h
diffstat 2 files changed, 13 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Mon Jun 04 02:19:51 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Mon Jun 04 02:31:02 2007 +0000
@@ -587,6 +587,8 @@
     g_return_val_if_fail(who != NULL, 0);
     g_return_val_if_fail(message != NULL, 0);
 
+	/* 'flags' has many options, not used here. */
+
     purple_debug_info("msim", "sending message from %s to %s: %s\n",
                   from_username, who, message);
 
@@ -597,7 +599,7 @@
     {
         purple_debug_info("msim", 
 				"msim_send_im: numeric 'who' detected, sending asap\n");
-        msim_send_im_by_userid(session, who, message, flags);
+        msim_send_im_by_userid(session, who, message);
         return 1;
     }
 
@@ -608,7 +610,6 @@
     cbinfo = g_new0(send_im_cb_struct, 1);
     cbinfo->who = g_strdup(who);
     cbinfo->message = g_strdup(message);
-    cbinfo->flags = flags;
 
     /* Send the request to lookup the userid */
 	/* TODO: don't use callbacks */
@@ -641,12 +642,11 @@
  * @param session 
  * @param userid ASCII numeric userid.
  * @param message Text of message to send.
- * @param flags Purple instant message flags.
  *
  * @return TRUE if successful.
  *
  */
-gboolean msim_send_im_by_userid(MsimSession *session, const gchar *userid, const gchar *message, PurpleMessageFlags flags)
+gboolean msim_send_im_by_userid(MsimSession *session, const gchar *userid, const gchar *message)
 {
     g_return_val_if_fail(MSIM_SESSION_VALID(session), 0);
     g_return_val_if_fail(userid != NULL, 0);
@@ -697,7 +697,7 @@
     userid = g_hash_table_lookup(body, "UserID");
 
     s = (send_im_cb_struct *)data;
-    msim_send_im_by_userid(session, userid, s->message, s->flags);
+    msim_send_im_by_userid(session, userid, s->message);
 
     g_hash_table_destroy(body);
     /* g_hash_table_destroy(userinfo); */
@@ -1136,7 +1136,7 @@
 
 	/* TODO: free */
     status_str = msim_msg_get_string(msg, "msg");
-	g_return_val_if_fail(status != NULL, FALSE);
+	g_return_val_if_fail(status_str != NULL, FALSE);
 
 	/* TODO: free */
     userid = msim_msg_get_string(msg, "f");
--- a/libpurple/protocols/myspace/myspace.h	Mon Jun 04 02:19:51 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.h	Mon Jun 04 02:31:02 2007 +0000
@@ -133,7 +133,7 @@
 /* Callback function pointer type for when a user's information is received, 
  * initiated from a user lookup. */
 typedef void (*MSIM_USER_LOOKUP_CB)(MsimSession *session, MsimMessage *userinfo,
-	   gpointer data);
+          gpointer data);
 
 /* Passed to MSIM_USER_LOOKUP_CB for msim_send_im_cb - called when
  * user information is available, ready to send a message. */
@@ -141,10 +141,8 @@
 {
     gchar *who;
     gchar *message;
-    PurpleMessageFlags flags;
 } send_im_cb_struct;
 
-
 /* Functions */
 gboolean msim_load(PurplePlugin *plugin);
 GList *msim_status_types(PurpleAccount *acct);
@@ -164,14 +162,14 @@
 		        gchar *email, gchar *password, guint *response_len);
 
 
-int msim_send_im(PurpleConnection *gc, const char *who,
-		const char *message, PurpleMessageFlags flags);
+int msim_send_im(PurpleConnection *gc, const char *who, const char *message, 
+	PurpleMessageFlags flags);
 int msim_send_im_by_userid(MsimSession *session, const gchar *userid, 
-		const gchar *message, PurpleMessageFlags flags);
-void msim_send_im_by_userid_cb(MsimSession *session, 
-		MsimMessage *userinfo, gpointer data);
+		const gchar *message);
+void msim_send_im_by_userid_cb(MsimSession *session, MsimMessage *userinfo, gpointer data);
 void msim_incoming_im_cb(MsimSession *session, MsimMessage *userinfo, 
-		gpointer data);
+		               gpointer data);
+
 int msim_incoming_im(MsimSession *session, MsimMessage *msg);
 int msim_incoming_action(MsimSession *session, MsimMessage *msg);