Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit e7bca3fc authored by rswindell's avatar rswindell

Created escape_telnet_iac (0xff) option.

parent 61037312
......@@ -35,6 +35,7 @@
#include "crc32.h"
#include "sexyz.h"
#include "telnet.h"
#define ENDOFFRAME 2
#define FRAMEOK 1
......@@ -207,6 +208,8 @@ int zmodem_send_esc(zmodem_t* zm, unsigned char c)
int zmodem_tx(zmodem_t* zm, unsigned char c)
{
int result;
switch (c) {
case DLE:
case DLE|0x80: /* even if high-bit set */
......@@ -221,6 +224,13 @@ int zmodem_tx(zmodem_t* zm, unsigned char c)
if(zm->escape_all_control_characters && (zm->last_sent&0x7f) == '@')
return zmodem_send_esc(zm, c);
break;
case TELNET_IAC:
if(zm->escape_telnet_iac) {
if((result=zmodem_send_raw(zm, ZDLE))!=0)
return(result);
return zmodem_send_raw(zm, ZRUB1);
}
break;
default:
if(zm->escape_all_control_characters && (c&0x60)==0)
return zmodem_send_esc(zm, c);
......
......@@ -251,6 +251,7 @@ typedef struct {
long crc_request;
/* Configuration */
BOOL escape_telnet_iac;
unsigned send_timeout;
unsigned recv_timeout;
unsigned max_errors;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment