libpurple/protocols/sametime/sametime.c

branch
soc.2008.masterpassword
changeset 34111
85b5efb9a873
parent 34108
7a07b6857540
parent 33796
4854740e5277
child 34148
62a874e41930
--- a/libpurple/protocols/sametime/sametime.c	Mon Mar 18 11:53:11 2013 +0100
+++ b/libpurple/protocols/sametime/sametime.c	Mon Mar 18 12:50:51 2013 +0100
@@ -987,7 +987,6 @@
   struct mwSametimeUser *stuser;
 
   PurpleGroup *group;
-  PurpleBuddy *buddy;
 
   GList *gl, *gtl, *ul, *utl;
 
@@ -1001,7 +1000,7 @@
     for(; ul; ul = ul->next) {
 
       stuser = (struct mwSametimeUser *) ul->data;
-      buddy = buddy_ensure(gc, group, stuser);
+      buddy_ensure(gc, group, stuser);
     }
     g_list_free(utl);
   }
@@ -2780,6 +2779,14 @@
       cid = make_cid(cid);
 
       /* add image to the purple image store */
+      /* TODO: This PurpleStoredImage will be rendered within the IM window
+         and right-clicking the image will allow the user to save the image
+         to disk.  The default filename used in this dialog is the filename
+         that we pass to purple_imgstore_new_with_id(), so we should call
+         g_path_get_basename() and purple_escape_filename() on it before
+         passing it in.  This is easy, but it's not clear if there might be
+         other implications because this filename is used elsewhere within
+         this PRPL. */
       img = purple_imgstore_new_with_id(d_dat, d_len, cid);
 
       /* map the cid to the image store identifier */
@@ -4976,7 +4983,7 @@
      data. wtf? */
 
   static char buf[BUF_LEN];
-  strncpy(buf, id, sizeof(buf));
+  g_strlcpy(buf, id, sizeof(buf));
   return buf;
 }
 

mercurial