Mercurial > pidgin
diff src/ft.c @ 4605:4fe88c94c3b4
[gaim-migrate @ 4892]
I renamed dest_filename to local_filename, and made it so dest_filename
is always the string containing the file on the local hard drive
(for reading AND writing). I am of the belief that this is less
ambiguous (that means it lives half its life on land and half its
life in the water).
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 22 Feb 2003 22:09:44 +0000 |
parents | 63c022ca157c |
children | 858979ab3867 |
line wrap: on
line diff
--- a/src/ft.c Sat Feb 22 19:56:39 2003 +0000 +++ b/src/ft.c Sat Feb 22 22:09:44 2003 +0000 @@ -79,8 +79,8 @@ if (xfer->remote_ip != NULL) g_free(xfer->remote_ip); if (xfer->local_ip != NULL) g_free(xfer->local_ip); - if (xfer->dest_filename != NULL) - g_free(xfer->dest_filename); + if (xfer->local_filename != NULL) + g_free(xfer->local_filename); g_free(xfer); } @@ -147,13 +147,13 @@ return; } - gaim_xfer_set_filename(xfer, filename); + gaim_xfer_set_local_filename(xfer, filename); gaim_xfer_set_size(xfer, sb.st_size); } else { /* TODO: Sanity checks and file overwrite checks. */ - gaim_xfer_set_dest_filename(xfer, filename); + gaim_xfer_set_local_filename(xfer, filename); } g_free(filename); @@ -207,12 +207,12 @@ } const char * -gaim_xfer_get_dest_filename(const struct gaim_xfer *xfer) +gaim_xfer_get_local_filename(const struct gaim_xfer *xfer) { if (xfer == NULL) return NULL; - return xfer->dest_filename; + return xfer->local_filename; } size_t @@ -313,15 +313,15 @@ } void -gaim_xfer_set_dest_filename(struct gaim_xfer *xfer, const char *filename) +gaim_xfer_set_local_filename(struct gaim_xfer *xfer, const char *filename) { if (xfer == NULL) return; - if (xfer->dest_filename != NULL) - g_free(xfer->dest_filename); + if (xfer->local_filename != NULL) + g_free(xfer->local_filename); - xfer->dest_filename = (filename == NULL ? NULL : g_strdup(filename)); + xfer->local_filename = (filename == NULL ? NULL : g_strdup(filename)); } void @@ -524,7 +524,7 @@ * We'll have already tried to open this earlier to make sure we can * read/write here. Should be safe. */ - xfer->dest_fp = fopen(gaim_xfer_get_dest_filename(xfer), + xfer->dest_fp = fopen(gaim_xfer_get_local_filename(xfer), type == GAIM_XFER_RECEIVE ? "wb" : "rb"); /* Just in case, though. */