commit - 21cbf37db5647159eced6ed1275e0e2e6980155c
commit + f37e495a2badf94fff2eaff24ed730dbceef94e0
blob - 73a66bbb469cdc8f72d33574144b0ee3e1e7f293
blob + 51ab8fd3eb968326e0f54ebe4063d2d50d65e509
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
#define MAX_COMMANDS 3
#define MAX_COMMANDS_SERVER 10
+#define MAX_COMMANDS_SERVICE MAX_COMMANDS_SERVER
static bool Handle_Write PARAMS(( CONN_ID Idx ));
/**
* Handle all data in the connection read-buffer.
* Data is processed until no complete command is left in the read buffer,
- * or MAX_COMMANDS[_SERVER] commands were processed.
+ * or MAX_COMMANDS[_SERVER|_SERVICE] commands were processed.
* When a fatal error occurs, the connection is shut down.
* @param Idx Index of the connection.
* @return number of bytes processed.
/* Servers do get special command limits, so they can process
* all the messages that are required while peering. */
- if (Client_Type(c) == CLIENT_SERVER)
- maxcmd = MAX_COMMANDS_SERVER;
+ switch (Client_Type(c)) {
+ case CLIENT_SERVER:
+ maxcmd = MAX_COMMANDS_SERVER; break;
+ case CLIENT_SERVICE:
+ maxcmd = MAX_COMMANDS_SERVICE; break;
+ }
starttime = time(NULL);
for (i=0; i < maxcmd; i++) {