shaperd (0.2.1-5.2) src/config.cpp

Summary

 src/config.cpp |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

    
download this patch

Patch contents

--- shaperd-0.2.1.orig/src/config.cpp
+++ shaperd-0.2.1/src/config.cpp
@@ -4,6 +4,7 @@
 #include "classdef.hpp"
 #include <stdio.h>
 #include <string.h>
+#include <cassert>
 
 extern "C" {
 	#include <netdb.h>
@@ -32,7 +33,7 @@
 static int get_ipq_maxlen();
 #endif
 
-shaper_config::shaper_config(int opt_fw=OPT_FW_NONE)
+shaper_config::shaper_config(int opt_fw)
 {
 	n_classes = 0;
 	v_classes = 0;
@@ -55,7 +56,7 @@
 {
 	classdef **new_vector;
 
-	new_vector = new(nothrow) (classdef *)[n_classes+1];
+	new_vector = new(nothrow) classdef*[n_classes+1];
 	if( new_vector==0 ) {
 		goto __err_new;
 	}
@@ -1544,8 +1545,9 @@
 	fp = fopen(IP_QUEUE_MAXLEN_FN, "r");
 	if( fp==0 ) {
 		log_message(LL_ALERT, 
-			"can't open %s (is ip_queue loaded? "
-			"is /proc mounted? how are babies made? :)",
+			"can't open %s (is ip_queue loaded?\n"
+			"is /proc mounted? how are babies made? :)\n"
+			"you can try 'mount /proc' and/or 'modprobe ip_queue'",
 			IP_QUEUE_MAXLEN_FN);
 		goto _err_cleanup;
 	}