"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "file.c" between
wireshark-3.4.5.tar.xz and wireshark-3.4.6.tar.xz

About: Wireshark is a network protocol analyzer. It lets you capture and interactively browse the traffic running on a computer network.

file.c  (wireshark-3.4.5.tar.xz):file.c  (wireshark-3.4.6.tar.xz)
skipping to change at line 4871 skipping to change at line 4871
case PSP_FINISHED: case PSP_FINISHED:
/* Completed successfully. */ /* Completed successfully. */
break; break;
case PSP_STOPPED: case PSP_STOPPED:
/* The user decided to abort the saving. /* The user decided to abort the saving.
If we're writing to a temporary file, remove it. If we're writing to a temporary file, remove it.
XXX - should we do so even if we're not writing to a XXX - should we do so even if we're not writing to a
temporary file? */ temporary file? */
wtap_dump_close(pdh, &err, &err_info); wtap_dump_close(pdh, &err, &err_info);
if (fname_new != NULL) if (fname_new != NULL) {
ws_unlink(fname_new); ws_unlink(fname_new);
g_free(fname_new);
}
return CF_WRITE_ABORTED; return CF_WRITE_ABORTED;
break; break;
case PSP_FAILED: case PSP_FAILED:
/* Error while saving. /* Error while saving.
If we're writing to a temporary file, remove it. */ If we're writing to a temporary file, remove it. */
if (fname_new != NULL) if (fname_new != NULL)
ws_unlink(fname_new); ws_unlink(fname_new);
wtap_dump_close(pdh, &err, &err_info); wtap_dump_close(pdh, &err, &err_info);
goto fail; goto fail;
skipping to change at line 4899 skipping to change at line 4901
if (fname_new != NULL) { if (fname_new != NULL) {
/* We wrote out to fname_new, and should rename it on top of /* We wrote out to fname_new, and should rename it on top of
fname; fname is now closed, so that should be possible even fname; fname is now closed, so that should be possible even
on Windows. Do the rename. */ on Windows. Do the rename. */
if (ws_rename(fname_new, fname) == -1) { if (ws_rename(fname_new, fname) == -1) {
/* Well, the rename failed. */ /* Well, the rename failed. */
cf_rename_failure_alert_box(fname, errno); cf_rename_failure_alert_box(fname, errno);
goto fail; goto fail;
} }
g_free(fname_new);
} }
return CF_WRITE_OK; return CF_WRITE_OK;
fail: fail:
if (fname_new != NULL) { if (fname_new != NULL) {
/* We were trying to write to a temporary file; get rid of it if it /* We were trying to write to a temporary file; get rid of it if it
exists. (We don't care whether this fails, as, if it fails, exists. (We don't care whether this fails, as, if it fails,
there's not much we can do about it. I guess if it failed for there's not much we can do about it. I guess if it failed for
a reason other than "it doesn't exist", we could report an a reason other than "it doesn't exist", we could report an
 End of changes. 3 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)