~ubuntu-branches/ubuntu/lucid/brasero/lucid-updates

« back to all changes in this revision

Viewing changes to libbrasero-media/scsi-get-performance.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-06-24 11:22:46 UTC
  • mfrom: (1.3.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100624112246-s5ubbf8tafqkir0m
Tags: 2.30.2-0ubuntu1
* New upstream release
  - Lot's of memleak fixes
  - Fixed a runtime warning related to cancelling tracker searches
  - Crash in brasero_data_project_node_removed at
    brasero-data-project.c:1163
  - brasero crashed with SIGSEGV in brasero_data_project_remove_node()
    (LP: #561319)
  - Fix a few runtime warnings with the Cover Editor
  - Text in cover editor does not show up automatically (LP: #469459)
  - Removed use of deprecated flags
  - Use accessor functions instead direct access (use GSEAL GnomeGoal)
  - Fix a bug in the layout on first start (side pane was hidden and
    remained so until the user moved it)
  - Save printer settings for cover printing
  - Write the contents of the GtkTextBuffer displayed line by displayed
    line which should improve the layout
  - "Write to Disc" button sensitivity regression
  - Fix flaw in mask that led libburn plugin not to work (not to be picked
    up actually) in some circumstances
  - Fails to burn ANY audio project
  - Move columns doesn't work (LP: #581759)
  - Brasero does not correctly handle double clicking on column separators
    (LP: #581885)
  - Bad info when burning, high CPU usage and slow burn
  - Change the priority for cdrdao and raised the one of cdda2wav plugin
  - brasero crashed with SIGSEGV in
    brasero_mmc3_get_performa nce_wrt_spd_desc() (LP: #564766)
  - brasero crashed with SIGSEGV in brasero_scsi_command_issue_sync()
    (LP: #444832)
  - Do not check for symlinks on cdda2wav so the plugin can use icedax.
  - Brasero's failure with some file names (LP: #380643)
  - Pressing create audio cd does nothing
  - Empty project not available
  - can't actually save error logs
  - doesn't handle incorrect temp dirs properly
  - Fix multi DND in GtkFileChooser
  - Displays "starting to record" during whole burn process
  - Fix wrong report of speed with both cdrecord and wodim
  - Disk project doesn't save the disk title (LP: #587924)
  - Brasero reports outdated cdrtools on cdrtools-3.00 (LP: #592075)
  - misc bug fixes
  - Updated Translations
* Removed upstream patches:
  - debian/patches/90_git_audio_project_creation.patch,
    debian/patches/91_git_audio_project_creation.patch,
    debian/patches/92_git_audio_cd_recording.patch,
    debian/patches/93_git_new_caps_function_definition.patch
* debian/patches/99_autoconf.patch:
  - refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
        memset (&hdr, 0, sizeof (hdr));
172
172
        BRASERO_SET_16 (cdb->max_desc, 0);
173
173
        res = brasero_scsi_command_issue_sync (cdb, &hdr, sizeof (hdr), error);
174
 
        if (res)
 
174
        if (res != BRASERO_SCSI_OK)
175
175
                return res;
176
176
 
177
177
        /* ... get the request size ... */
193
193
                      sizeof (buffer->hdr.len);
194
194
 
195
195
        if (request_size < buffer_size) {
196
 
                BraseroScsiGetPerfHdr *tmp_hdr;
 
196
                BraseroScsiGetPerfData *new_buffer;
197
197
 
198
198
                /* Strangely some drives returns a buffer size that is bigger
199
199
                 * than the one they returned on the first time. So redo whole
203
203
                                   request_size,
204
204
                                   buffer_size);
205
205
 
206
 
                tmp_hdr = &buffer->hdr;
207
 
                request_size = buffer_size;
208
 
                buffer = brasero_get_performance_get_buffer (cdb,
209
 
                                                             sizeof_descriptors,
210
 
                                                             tmp_hdr,
211
 
                                                             error);
212
 
                buffer_size = BRASERO_GET_32 (buffer->hdr.len) +
213
 
                              G_STRUCT_OFFSET (BraseroScsiGetPerfHdr, len) +
214
 
                              sizeof (buffer->hdr.len);
215
 
                
216
 
                g_free (tmp_hdr);
 
206
                /* Try to get a new buffer of the new size */
 
207
                memcpy (&hdr, &buffer->hdr, sizeof (hdr));
 
208
                new_buffer = brasero_get_performance_get_buffer (cdb,
 
209
                                                                 sizeof_descriptors,
 
210
                                                                 &hdr,
 
211
                                                                 error);
 
212
                if (new_buffer) {
 
213
                        g_free (buffer);
 
214
                        buffer = new_buffer;
 
215
 
 
216
                        request_size = buffer_size;
 
217
                        buffer_size = BRASERO_GET_32 (buffer->hdr.len) +
 
218
                                      G_STRUCT_OFFSET (BraseroScsiGetPerfHdr, len) +
 
219
                                      sizeof (buffer->hdr.len);
 
220
                }
217
221
        }
218
222
        else if (request_size > buffer_size)
219
223
                BRASERO_MEDIA_LOG ("Sizes mismatch asked %i / received %i",
220
 
                                  request_size,
221
 
                                  buffer_size);
 
224
                                   request_size,
 
225
                                   buffer_size);
222
226
        *data = buffer;
223
227
        *data_size = MIN (buffer_size, request_size);
224
228
 
238
242
        BraseroGetPerformanceCDB *cdb;
239
243
        BraseroScsiResult res;
240
244
 
 
245
        g_return_val_if_fail (handle != NULL, BRASERO_SCSI_FAILURE);
 
246
 
241
247
        cdb = brasero_scsi_command_new (&info, handle);
242
248
        cdb->type = BRASERO_GET_PERFORMANCE_WR_SPEED_TYPE;
243
249