Mercurial > gftp.yaz
comparison lib/rfc959.c @ 105:ae13b18c9336
2003-2-9 Brian Masney <masneyb@gftp.org>
* lib/protocols.c (parse_time) - parse more time formats. Better
error checking. If there was an error parsing this time,
skip ahead to the next token
* lib/rfc2068.c - this was completely broken. This was broken whenever
I did the conversion over to use the gftp_get_line() function.
* lib/rfc959.c - use g_strdup instead of g_malloc/strcpy
author | masneyb |
---|---|
date | Sun, 09 Feb 2003 20:05:35 +0000 |
parents | 8c37d73d3f1f |
children | 982e3890e7fe |
comparison
equal
deleted
inserted
replaced
104:31a004f868f7 | 105:ae13b18c9336 |
---|---|
65 while (strncmp (code, tempstr, 4) != 0); | 65 while (strncmp (code, tempstr, 4) != 0); |
66 | 66 |
67 if (num_read < 0) | 67 if (num_read < 0) |
68 return ((int) num_read); | 68 return ((int) num_read); |
69 | 69 |
70 request->last_ftp_response = g_malloc (strlen (tempstr) + 1); | 70 request->last_ftp_response = g_strdup (tempstr); |
71 strcpy (request->last_ftp_response, tempstr); | |
72 | 71 |
73 if (request->last_ftp_response[0] == '4' && | 72 if (request->last_ftp_response[0] == '4' && |
74 request->last_ftp_response[1] == '2') | 73 request->last_ftp_response[1] == '2') |
75 gftp_disconnect (request); | 74 gftp_disconnect (request); |
76 | 75 |
252 *pos = '\0'; | 251 *pos = '\0'; |
253 | 252 |
254 if (request->directory) | 253 if (request->directory) |
255 g_free (request->directory); | 254 g_free (request->directory); |
256 | 255 |
257 request->directory = g_malloc (strlen (dir) + 1); | 256 request->directory = g_strdup (dir); |
258 strcpy (request->directory, dir); | |
259 return (0); | 257 return (0); |
260 } | 258 } |
261 | 259 |
262 | 260 |
263 static int | 261 static int |