New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix various cmake issues #54
Changes from all commits
eeedb0c
7c2b801
a6a5b4c
c494509
7c3f939
1636cf9
88297d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ on: | |
- master | ||
- develop | ||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
Build: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
build/ | ||
.vscode/ | ||
/build/ | ||
/.vscode/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -407,7 +407,6 @@ static void _negotiate(telnet_t *telnet, unsigned char telopt) { | |
break; | ||
case Q_WANTNO_OP: | ||
_set_rfc1143(telnet, telopt, Q_US(q), Q_YES); | ||
NEGOTIATE_EVENT(telnet, TELNET_EV_WILL, telopt); | ||
_error(telnet, __LINE__, __func__, TELNET_EPROTOCOL, 0, | ||
"DONT answered by WILL"); | ||
break; | ||
|
@@ -437,7 +436,8 @@ static void _negotiate(telnet_t *telnet, unsigned char telopt) { | |
break; | ||
case Q_WANTNO_OP: | ||
_set_rfc1143(telnet, telopt, Q_US(q), Q_WANTYES); | ||
NEGOTIATE_EVENT(telnet, TELNET_EV_DO, telopt); | ||
_send_negotiate(telnet, TELNET_DO, telopt); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This don't seem to be related to the CMake issues; can you split these out to a separate PR? (Although I believe these are already addressed by another open PR.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #57 |
||
NEGOTIATE_EVENT(telnet, TELNET_EV_WONT, telopt); | ||
break; | ||
case Q_WANTYES: | ||
case Q_WANTYES_OP: | ||
|
@@ -465,7 +465,6 @@ static void _negotiate(telnet_t *telnet, unsigned char telopt) { | |
break; | ||
case Q_WANTNO_OP: | ||
_set_rfc1143(telnet, telopt, Q_YES, Q_HIM(q)); | ||
NEGOTIATE_EVENT(telnet, TELNET_EV_DO, telopt); | ||
_error(telnet, __LINE__, __func__, TELNET_EPROTOCOL, 0, | ||
"WONT answered by DO"); | ||
break; | ||
|
@@ -491,12 +490,12 @@ static void _negotiate(telnet_t *telnet, unsigned char telopt) { | |
break; | ||
case Q_WANTNO: | ||
_set_rfc1143(telnet, telopt, Q_NO, Q_HIM(q)); | ||
NEGOTIATE_EVENT(telnet, TELNET_EV_WONT, telopt); | ||
NEGOTIATE_EVENT(telnet, TELNET_EV_DONT, telopt); | ||
break; | ||
case Q_WANTNO_OP: | ||
_set_rfc1143(telnet, telopt, Q_WANTYES, Q_HIM(q)); | ||
_send_negotiate(telnet, TELNET_WILL, telopt); | ||
NEGOTIATE_EVENT(telnet, TELNET_EV_WILL, telopt); | ||
NEGOTIATE_EVENT(telnet, TELNET_EV_DONT, telopt); | ||
break; | ||
case Q_WANTYES: | ||
case Q_WANTYES_OP: | ||
|
@@ -553,7 +552,7 @@ static int _environ_telnet(telnet_t *telnet, unsigned char type, | |
ev.type = TELNET_EV_ENVIRON; | ||
telnet->eh(telnet, &ev, telnet->ud); | ||
|
||
return 1; | ||
return 0; | ||
} | ||
|
||
/* very second byte must be VAR or USERVAR, if present */ | ||
|
@@ -657,7 +656,7 @@ static int _environ_telnet(telnet_t *telnet, unsigned char type, | |
|
||
/* clean up */ | ||
free(values); | ||
return 1; | ||
return 0; | ||
} | ||
|
||
/* process an MSSP subnegotiation buffer */ | ||
|
@@ -849,17 +848,14 @@ static int _subnegotiate(telnet_t *telnet) { | |
* start handling the compressed stream if it's not already. | ||
*/ | ||
case TELNET_TELOPT_COMPRESS2: | ||
if (telnet->sb_telopt == TELNET_TELOPT_COMPRESS2) { | ||
if (_init_zlib(telnet, 0, 1) != TELNET_EOK) | ||
return 0; | ||
if (_init_zlib(telnet, 0, 1) != TELNET_EOK) | ||
return 0; | ||
|
||
/* notify app that compression was enabled */ | ||
ev.type = TELNET_EV_COMPRESS; | ||
ev.compress.state = 1; | ||
telnet->eh(telnet, &ev, telnet->ud); | ||
return 1; | ||
} | ||
return 0; | ||
/* notify app that compression was enabled */ | ||
ev.type = TELNET_EV_COMPRESS; | ||
ev.compress.state = 1; | ||
telnet->eh(telnet, &ev, telnet->ud); | ||
return 1; | ||
#endif /* defined(HAVE_ZLIB) */ | ||
|
||
/* specially handled subnegotiation telopt types */ | ||
|
@@ -1613,6 +1609,9 @@ void telnet_ttype_send(telnet_t *telnet) { | |
void telnet_ttype_is(telnet_t *telnet, const char* ttype) { | ||
static const unsigned char IS[] = { TELNET_IAC, TELNET_SB, | ||
TELNET_TELOPT_TTYPE, TELNET_TTYPE_IS }; | ||
if (!ttype) { | ||
ttype = "NVT"; | ||
} | ||
_sendu(telnet, IS, sizeof(IS)); | ||
_send(telnet, ttype, strlen(ttype)); | ||
telnet_finish_sb(telnet); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this required? I'm tentative to bump the minimum required here without a really good reason.