projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Patch to PSFTP: implement mkdir, rmdir, rm and scripting. Still to
[u/mdw/putty]
/
raw.c
diff --git
a/raw.c
b/raw.c
index
6106176
..
86fd531
100644
(file)
--- a/
raw.c
+++ b/
raw.c
@@
-15,11
+15,6
@@
static Socket s = NULL;
static void raw_size(void);
static void raw_size(void);
-static int sb_opt, sb_len;
-static char *sb_buf = NULL;
-static int sb_size = 0;
-#define SB_DELTA 1024
-
static void c_write(char *buf, int len)
{
from_backend(0, buf, len);
static void c_write(char *buf, int len)
{
from_backend(0, buf, len);
@@
-28,8
+23,10
@@
static void c_write(char *buf, int len)
static int raw_closing(Plug plug, char *error_msg, int error_code,
int calling_back)
{
static int raw_closing(Plug plug, char *error_msg, int error_code,
int calling_back)
{
- sk_close(s);
- s = NULL;
+ if (s) {
+ sk_close(s);
+ s = NULL;
+ }
if (error_msg) {
/* A socket error has occurred. */
connection_fatal(error_msg);
if (error_msg) {
/* A socket error has occurred. */
connection_fatal(error_msg);
@@
-48,7
+45,8
@@
static int raw_receive(Plug plug, int urgent, char *data, int len)
*
* Returns an error message, or NULL on success.
*
*
* Returns an error message, or NULL on success.
*
- * Also places the canonical host name into `realhost'.
+ * Also places the canonical host name into `realhost'. It must be
+ * freed by the caller.
*/
static char *raw_init(char *host, int port, char **realhost)
{
*/
static char *raw_init(char *host, int port, char **realhost)
{