"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/conf_cluster.c" between
ircd-hybrid-8.2.27.tgz and ircd-hybrid-8.2.28.tgz

About: IRCD-Hybrid is a Internet Relay Chat server.

conf_cluster.c  (ircd-hybrid-8.2.27.tgz):conf_cluster.c  (ircd-hybrid-8.2.28.tgz)
skipping to change at line 24 skipping to change at line 24
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
*/ */
/*! \file conf_cluster.c /*! \file conf_cluster.c
* \brief Implements cluster {} block configuration management. * \brief Implements cluster {} block configuration management.
* \version $Id: conf_cluster.c 9102 2020-01-01 09:58:57Z michael $ * \version $Id: conf_cluster.c 9201 2020-01-24 23:51:50Z michael $
*/ */
#include "stdinc.h" #include "stdinc.h"
#include "ircd_defs.h" #include "ircd_defs.h"
#include "list.h" #include "list.h"
#include "memory.h" #include "memory.h"
#include "conf_cluster.h" #include "conf_cluster.h"
#include "server_capab.h" #include "server_capab.h"
#include "send.h" #include "send.h"
skipping to change at line 70 skipping to change at line 70
dlinkAdd(cluster, &cluster->node, &cluster_list); dlinkAdd(cluster, &cluster->node, &cluster_list);
return cluster; return cluster;
} }
void void
cluster_distribute(const void *source_p, const char *command, unsigned int capab , cluster_distribute(const void *source_p, const char *command, unsigned int capab ,
unsigned int type, const char *pattern, ...) unsigned int type, const char *pattern, ...)
{ {
va_list args; va_list args;
char buffer[IRCD_BUFSIZE] = ""; char buf[IRCD_BUFSIZE];
dlink_node *node; dlink_node *node;
va_start(args, pattern); va_start(args, pattern);
vsnprintf(buffer, sizeof(buffer), pattern, args); vsnprintf(buf, sizeof(buf), pattern, args);
va_end(args); va_end(args);
DLINK_FOREACH(node, cluster_list.head) DLINK_FOREACH(node, cluster_list.head)
{ {
const struct ClusterItem *cluster = node->data; const struct ClusterItem *cluster = node->data;
if (cluster->type & type) if (cluster->type & type)
sendto_match_servs(source_p, cluster->server, CAPAB_CLUSTER | capab, sendto_match_servs(source_p, cluster->server, CAPAB_CLUSTER | capab,
"%s %s %s", command, cluster->server, buffer); "%s %s %s", command, cluster->server, buf);
} }
} }
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)