comparison pidgin/gtkstatusbox.c @ 22102:e6e018d0bf03

merge of '464169ffadabb173b3052074b132f38025b2e88d' and '88dc67220e1d61e540c931b9f27f5b4419809137'
author Richard Laager <rlaager@wiktel.com>
date Mon, 14 Jan 2008 04:09:03 +0000
parents 51d6ae399919 85cda171621a
children 69ad31c9983d
comparison
equal deleted inserted replaced
22101:0b823f16162c 22102:e6e018d0bf03
318 statusbox_got_url(PurpleUtilFetchUrlData *url_data, gpointer user_data, 318 statusbox_got_url(PurpleUtilFetchUrlData *url_data, gpointer user_data,
319 const gchar *themedata, size_t len, const gchar *error_message) 319 const gchar *themedata, size_t len, const gchar *error_message)
320 { 320 {
321 FILE *f; 321 FILE *f;
322 gchar *path; 322 gchar *path;
323 size_t wc;
323 324
324 if ((error_message != NULL) || (len == 0)) 325 if ((error_message != NULL) || (len == 0))
325 return; 326 return;
326 327
327 f = purple_mkstemp(&path, TRUE); 328 f = purple_mkstemp(&path, TRUE);
328 fwrite(themedata, len, 1, f); 329 wc = fwrite(themedata, len, 1, f);
330 if (wc != 1) {
331 purple_debug_warning("theme_got_url", "Unable to write theme data.\n");
332 fclose(f);
333 g_unlink(path);
334 g_free(path);
335 return;
336 }
329 fclose(f); 337 fclose(f);
330 338
331 icon_choose_cb(path, user_data); 339 icon_choose_cb(path, user_data);
332 340
333 g_unlink(path); 341 g_unlink(path);