# HG changeset patch # User Mark Doliner # Date 1045951784 0 # Node ID 4fe88c94c3b4c3d9c51d5335be4f0add7122dc43 # Parent bf42e10c1d8ab9391ba2215902235a788939dbbd [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 diff -r bf42e10c1d8a -r 4fe88c94c3b4 src/ft.c --- 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. */ diff -r bf42e10c1d8a -r 4fe88c94c3b4 src/ft.h --- a/src/ft.h Sat Feb 22 19:56:39 2003 +0000 +++ b/src/ft.h Sat Feb 22 22:09:44 2003 +0000 @@ -67,8 +67,8 @@ char *who; /**< The person on the other end of the transfer. */ - char *filename; /**< The name of the file. */ - char *dest_filename; /**< The destination filename. */ + char *filename; /**< The name sent over the network. */ + char *local_filename; /**< The name on the local hard drive. */ size_t size; /**< The size of the file. */ FILE *dest_fp; /**< The destination file pointer. */ @@ -196,7 +196,7 @@ * * @return The destination filename. */ -const char *gaim_xfer_get_dest_filename(const struct gaim_xfer *xfer); +const char *gaim_xfer_get_local_filename(const struct gaim_xfer *xfer); /** * Returns the number of bytes sent so far. @@ -289,12 +289,12 @@ void gaim_xfer_set_filename(struct gaim_xfer *xfer, const char *filename); /** - * Sets the destination filename for the file transfer. + * Sets the local filename for the file transfer. * * @param xfer The file transfer. * @param filename The filename */ -void gaim_xfer_set_dest_filename(struct gaim_xfer *xfer, const char *filename); +void gaim_xfer_set_local_filename(struct gaim_xfer *xfer, const char *filename); /** * Sets the size of the file in a file transfer.