break;
}
}
- if(Crypto_RetrieveHostKey(&addr, 0, NULL, 0, idfp, sizeof(idfp), NULL))
+ if(Crypto_RetrieveHostKey(&addr, 0, NULL, 0, idfp, sizeof(idfp), NULL, NULL))
{
for(i = 0; i < nFavorites_idfp; ++i)
{
}
}
-void NetConn_UpdateCleartime(double *cleartime, int rate, int burstsize, int len)
+static void NetConn_UpdateCleartime(double *cleartime, int rate, int burstsize, int len)
{
double bursttime = burstsize / (double)rate;
sendreliable = true;
}
// outgoing unreliable packet number, and outgoing reliable packet number (0 or 1)
- StoreLittleLong(sendbuffer, (unsigned int)conn->outgoing_unreliable_sequence | ((unsigned int)sendreliable<<31));
+ StoreLittleLong(sendbuffer, conn->outgoing_unreliable_sequence | (((unsigned int)sendreliable)<<31));
// last received unreliable packet number, and last received reliable packet number (0 or 1)
- StoreLittleLong(sendbuffer + 4, (unsigned int)conn->qw.incoming_sequence | ((unsigned int)conn->qw.incoming_reliable_sequence<<31));
+ StoreLittleLong(sendbuffer + 4, conn->qw.incoming_sequence | (((unsigned int)conn->qw.incoming_reliable_sequence)<<31));
packetLen = 8;
conn->outgoing_unreliable_sequence++;
// client sends qport in every packet
if (protocol == PROTOCOL_QUAKEWORLD)
{
- int sequence, sequence_ack;
+ unsigned int sequence, sequence_ack;
int reliable_ack, reliable_message;
int count;
//int qport;
{
conn->droppedDatagrams += count;
//Con_DPrintf("Dropped %u datagram(s)\n", count);
+ // If too may packets have been dropped, only write the
+ // last NETGRAPH_PACKETS ones to the netgraph. Why?
+ // Because there's no point in writing more than
+ // these as the netgraph is going to be full anyway.
+ if (count > NETGRAPH_PACKETS)
+ count = NETGRAPH_PACKETS;
while (count--)
{
conn->incoming_packetcounter = (conn->incoming_packetcounter + 1) % NETGRAPH_PACKETS;
count = sequence - conn->nq.unreliableReceiveSequence;
conn->droppedDatagrams += count;
//Con_DPrintf("Dropped %u datagram(s)\n", count);
+ // If too may packets have been dropped, only write the
+ // last NETGRAPH_PACKETS ones to the netgraph. Why?
+ // Because there's no point in writing more than
+ // these as the netgraph is going to be full anyway.
+ if (count > NETGRAPH_PACKETS)
+ count = NETGRAPH_PACKETS;
while (count--)
{
conn->incoming_packetcounter = (conn->incoming_packetcounter + 1) % NETGRAPH_PACKETS;
if(cls.crypto.authenticated)
{
Crypto_FinishInstance(crypto, &cls.crypto);
- Con_Printf("%s connection to %s has been established: server is %s@%.*s, I am %.*s@%.*s\n",
+ Con_Printf("%s connection to %s has been established: server is %s@%s%.*s, I am %.*s@%s%.*s\n",
crypto->use_aes ? "Encrypted" : "Authenticated",
cls.netcon->address,
crypto->server_idfp[0] ? crypto->server_idfp : "-",
+ (crypto->server_issigned || !crypto->server_keyfp[0]) ? "" : "~",
crypto_keyfp_recommended_length, crypto->server_keyfp[0] ? crypto->server_keyfp : "-",
crypto_keyfp_recommended_length, crypto->client_idfp[0] ? crypto->client_idfp : "-",
+ (crypto->client_issigned || !crypto->client_keyfp[0]) ? "" : "~",
crypto_keyfp_recommended_length, crypto->client_keyfp[0] ? crypto->client_keyfp : "-"
);
}
qboolean hasquotes;
qboolean restricted = false;
qboolean have_usernames = false;
- char vabuf[1024];
+ static char vabuf[1024];
userpass_start = rcon_password.string;
while((userpass_end = strchr(userpass_start, ' ')))
// no need to check challenge
if(crypto_developer.integer)
{
- Con_Printf("%s connection to %s is being established: client is %s@%.*s, I am %.*s@%.*s\n",
+ Con_Printf("%s connection to %s is being established: client is %s@%s%.*s, I am %.*s@%s%.*s\n",
crypto->use_aes ? "Encrypted" : "Authenticated",
addressstring2,
crypto->client_idfp[0] ? crypto->client_idfp : "-",
+ (crypto->client_issigned || !crypto->client_keyfp[0]) ? "" : "~",
crypto_keyfp_recommended_length, crypto->client_keyfp[0] ? crypto->client_keyfp : "-",
crypto_keyfp_recommended_length, crypto->server_idfp[0] ? crypto->server_idfp : "-",
+ (crypto->server_issigned || !crypto->server_keyfp[0]) ? "" : "~",
crypto_keyfp_recommended_length, crypto->server_keyfp[0] ? crypto->server_keyfp : "-"
);
}