|
From: Mark D. <the...@us...> - 2003-02-22 22:09:46
|
Update of /cvsroot/gaim/gaim/src
In directory sc8-pr-cvs1:/tmp/cvs-serv14926/src
Modified Files:
ft.c ft.h
Log Message:
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).
Index: ft.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/ft.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- ft.c 20 Feb 2003 21:54:03 -0000 1.25
+++ ft.c 22 Feb 2003 22:09:44 -0000 1.26
@@ -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. */
Index: ft.h
===================================================================
RCS file: /cvsroot/gaim/gaim/src/ft.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ft.h 20 Feb 2003 21:54:05 -0000 1.6
+++ ft.h 22 Feb 2003 22:09:44 -0000 1.7
@@ -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.
|