Remove unused DCC_CNCT_PEND flag and always define DCC_SSL

DCC_CNCT_PEND was only ever set, not tested, so it was pointless.

There's no point only defining DCC_SSL when HAVE_SSL is defined: we can't
re-use that flag bit anyway, so might as well just define it always.

Also fixes a "flags && DCC_WAIT" that should have been "flags & DCC_WAIT".
This has no practical effect though I believe, since as far as I can tell
DCC_WAIT would always be set at that point anyway.
This commit is contained in:
Kevin Easton
2015-10-03 22:10:15 +10:00
parent 857a5fa524
commit c173af3f65
2 changed files with 2 additions and 17 deletions

View File

@@ -97,22 +97,13 @@
#define DCC_OFFER 0x00040000
#define DCC_DELETE 0x00080000
#define DCC_TWOCLIENTS 0x00100000
#ifdef NON_BLOCKING_CONNECTS
#define DCC_CNCT_PEND 0x00200000
#endif
#ifdef HAVE_SSL
#define DCC_SSL 0x04000000
#endif
#define DCC_QUEUE 0x00400000
#define DCC_TDCC 0x00800000
#define DCC_BOTCHAT 0x01000000
#define DCC_ECHO 0x02000000
#define DCC_SSL 0x04000000
#define DCC_STATES 0xffffff00
int check_dcc_list (char *);
int dcc_exempt_save (FILE *);

View File

@@ -543,9 +543,6 @@ DCC_List *new_i;
s = &new_i->sock;
new = (DCC_int *)s->info;
#ifdef DCC_CNCT_PEND
flags |= DCC_CNCT_PEND;
#endif
new->remport = ntohs(new->remport);
if ((new_s = connect_by_number(inet_ntoa(new->remote), &new->remport, SERVICE_CLIENT, PROTOCOL_TCP, 0)) < 0
#ifdef HAVE_SSL
@@ -627,9 +624,6 @@ DCC_List *new_i;
if (get_int_var(DCC_FORCE_PORT_VAR))
portnum = get_int_var(DCC_FORCE_PORT_VAR);
#ifdef DCC_CNCT_PEND
flags |= DCC_CNCT_PEND;
#endif
flags |= DCC_WAIT;
if ((s = connect_by_number(NULL, &portnum, SERVICE_SERVER, PROTOCOL_TCP, 1)) < 0)
{
@@ -1245,7 +1239,7 @@ UserList *ul = NULL;
reset_display_target();
return;
}
if ((s->flags && DCC_WAIT))
if ((s->flags & DCC_WAIT))
{
if (Ctype == DCC_CHAT)
{