Update to kismet-2007-10-R1.
Tested by quite some people (after some pushing by sthen@). ok sthen@
This commit is contained in:
parent
251b5e8d24
commit
a4b727f653
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.18 2007/09/13 08:35:02 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.19 2007/11/10 21:10:42 kili Exp $
|
||||
# Much help came from Alexandre Anriot, Robert Nagy, Bernd Ahlers,
|
||||
# and, last but not least, Pedro la Peu.
|
||||
|
||||
@ -8,10 +8,10 @@ COMMENT-gpsmap= reads GPS and Network XML datafiles and plots networks
|
||||
# No wireless capabilities
|
||||
NOT_FOR_ARCHS=m68k m88k vax
|
||||
|
||||
V= 2007-01-R1b
|
||||
V= 2007-10-R1
|
||||
DISTNAME= kismet-${V}
|
||||
PKGNAME-main= kismet-${V:S,-,,g}p0
|
||||
PKGNAME-gpsmap= kismet-gpsmap-${V:S,-,,g}p1
|
||||
PKGNAME-main= kismet-${V:S,-,,g}
|
||||
PKGNAME-gpsmap= kismet-gpsmap-${V:S,-,,g}
|
||||
CATEGORIES= net security
|
||||
|
||||
HOMEPAGE= http://www.kismetwireless.net/
|
||||
@ -25,13 +25,14 @@ PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
CONFIGURE_STYLE= autoconf old
|
||||
AUTOCONF_VERSION= 2.59
|
||||
# "old" is required for setting --sysconfdir
|
||||
CONFIGURE_STYLE= gnu old
|
||||
|
||||
CONFDIR= ${SYSCONFDIR}/kismet
|
||||
SUBST_VARS+= CONFDIR
|
||||
|
||||
CONFIGURE_ARGS= --sysconfdir=${CONFDIR}
|
||||
CONFIGURE_ARGS= --sysconfdir=${CONFDIR} \
|
||||
--mandir=${PREFIX}/man
|
||||
|
||||
CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
|
||||
LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib"
|
||||
@ -67,7 +68,7 @@ CONFIGURE_ARGS+= --disable-gpsmap
|
||||
post-configure:
|
||||
@cd ${WRKSRC} && ${GMAKE} depend
|
||||
|
||||
post-build:
|
||||
post-patch:
|
||||
@perl -pi -e \
|
||||
's,/usr/local/etc(/kismet.conf),${CONFDIR}$$1,' \
|
||||
${WRKSRC}/man/kismet.conf.5
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (kismet-2007-01-R1b.tar.gz) = odzqcfDD+IHvcvW8ott7OQ==
|
||||
RMD160 (kismet-2007-01-R1b.tar.gz) = HwZr0maeVx/+YnibgqKLvezipHk=
|
||||
SHA1 (kismet-2007-01-R1b.tar.gz) = 0JJW50TsDKkk+Ahj/quo5UjUtL8=
|
||||
SHA256 (kismet-2007-01-R1b.tar.gz) = G5mLNOLpN39ax3BCldZFByNP52VuSdOE+L+VYE6X4Fs=
|
||||
SIZE (kismet-2007-01-R1b.tar.gz) = 625585
|
||||
MD5 (kismet-2007-10-R1.tar.gz) = IQDGZ+adsM3jX6LQbIUW4g==
|
||||
RMD160 (kismet-2007-10-R1.tar.gz) = fLYqP9lkye5+Tsa+8FBVjIBqtJU=
|
||||
SHA1 (kismet-2007-10-R1.tar.gz) = ocaCeXrWhCtT+eDwOCVKqDJuD7Q=
|
||||
SHA256 (kismet-2007-10-R1.tar.gz) = Aj5/RwOcGthhUFLkZPdqPNSWpCNEm5MQNtEnxW1Ysrk=
|
||||
SIZE (kismet-2007-10-R1.tar.gz) = 646452
|
||||
|
@ -1,10 +1,10 @@
|
||||
$OpenBSD: patch-Makefile_in,v 1.4 2007/04/09 20:50:57 kili Exp $
|
||||
$OpenBSD: patch-Makefile_in,v 1.5 2007/11/10 21:10:42 kili Exp $
|
||||
|
||||
# Don't hard code -O2 -Wall.
|
||||
# Use BSD_INSTALL_* macros for installation.
|
||||
|
||||
--- Makefile.in.orig Fri Dec 15 00:01:06 2006
|
||||
+++ Makefile.in Thu Dec 28 11:06:53 2006
|
||||
--- Makefile.in.orig Sun Sep 9 23:01:20 2007
|
||||
+++ Makefile.in Wed Sep 12 22:02:32 2007
|
||||
@@ -21,8 +21,8 @@ LD = @CXX@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
@ -16,9 +16,12 @@ $OpenBSD: patch-Makefile_in,v 1.4 2007/04/09 20:50:57 kili Exp $
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
SUID = @suid@
|
||||
|
||||
@@ -128,52 +128,52 @@ checkuiconfig:
|
||||
@@ -137,53 +137,55 @@ checkuiconfig:
|
||||
echo "latest version is `grep version= conf/kismet_ui.conf | cut -f 2 -d=`"; \
|
||||
fi
|
||||
|
||||
+.PHONY: binuserinstall
|
||||
+
|
||||
binuserinstall:
|
||||
- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(PS) $(BIN)/$(PS);
|
||||
- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(DRONE) $(BIN)/$(DRONE);
|
||||
@ -37,10 +40,10 @@ $OpenBSD: patch-Makefile_in,v 1.4 2007/04/09 20:50:57 kili Exp $
|
||||
+ $(BSD_INSTALL_DATA_DIR) $(ETC)
|
||||
+ $(BSD_INSTALL_PROGRAM_DIR) $(BIN)
|
||||
|
||||
- install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/kismet $(BIN)/kismet
|
||||
- install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(WRAP) $(BIN)/kismet
|
||||
- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(NC) $(BIN)/$(NC)
|
||||
- # install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(HOPPER) $(BIN)/$(HOPPER)
|
||||
+ $(BSD_INSTALL_SCRIPT) scripts/kismet $(BIN)/kismet
|
||||
+ $(BSD_INSTALL_PROGRAM) $(WRAP) $(BIN)/kismet
|
||||
+ $(BSD_INSTALL_PROGRAM) $(NC) $(BIN)/$(NC)
|
||||
+ # $(BSD_INSTALL_PROGRAM) $(HOPPER) $(BIN)/$(HOPPER)
|
||||
@if test "$(ZAURUS)" = "yes"; then \
|
||||
@ -104,7 +107,7 @@ $OpenBSD: patch-Makefile_in,v 1.4 2007/04/09 20:50:57 kili Exp $
|
||||
|
||||
@if test -f $(BIN)/kismet_curses; then \
|
||||
echo "Removing old kismet_curses binary. The panels frontend is now kismet_client."; \
|
||||
@@ -186,22 +186,22 @@ suidinstall: $(PS) $(DRONE) $(NC) $(GPSL
|
||||
@@ -196,22 +198,22 @@ suidinstall: $(PS) $(DRONE) $(NC) $(GPSLBUILD) $(ZAURU
|
||||
@if test -f $(ETC)/kismet.conf; then \
|
||||
$(MAKE) -e checkconfig; \
|
||||
else \
|
||||
@ -133,7 +136,7 @@ $OpenBSD: patch-Makefile_in,v 1.4 2007/04/09 20:50:57 kili Exp $
|
||||
echo "Installed UI config into $(ETC)/kismet_ui.conf."; \
|
||||
fi
|
||||
@echo "Installed kismet into $(BIN)/."
|
||||
@@ -219,22 +219,22 @@ install: $(PS) $(DRONE) $(NC) $(GPSLBUIL
|
||||
@@ -229,22 +231,22 @@ install: $(PS) $(DRONE) $(NC) $(GPSLBUILD) $(ZAURUSBUI
|
||||
@if test -f $(ETC)/kismet.conf; then \
|
||||
$(MAKE) -e checkconfig; \
|
||||
else \
|
||||
@ -162,7 +165,7 @@ $OpenBSD: patch-Makefile_in,v 1.4 2007/04/09 20:50:57 kili Exp $
|
||||
echo "Installed UI config into $(ETC)/kismet_ui.conf."; \
|
||||
fi
|
||||
@echo "Installed kismet into $(BIN)/."
|
||||
@@ -250,11 +250,11 @@ install: $(PS) $(DRONE) $(NC) $(GPSLBUIL
|
||||
@@ -260,11 +262,11 @@ install: $(PS) $(DRONE) $(NC) $(GPSLBUILD) $(ZAURUSBUI
|
||||
forceinstall: $(PS)
|
||||
$(MAKE) -e commoninstall
|
||||
$(MAKE) -e binuserinstall
|
||||
@ -177,7 +180,7 @@ $OpenBSD: patch-Makefile_in,v 1.4 2007/04/09 20:50:57 kili Exp $
|
||||
echo "Installed UI config into $(ETC)/kismet_ui.conf.";
|
||||
@echo "Installed kismet into $(BIN)/."
|
||||
@echo "If you have not done so already, read the README file and the FAQ file. Additional"
|
||||
@@ -269,11 +269,11 @@ forceinstall: $(PS)
|
||||
@@ -279,11 +281,11 @@ forceinstall: $(PS)
|
||||
suidforceinstall: $(PS)
|
||||
$(MAKE) -e commoninstall
|
||||
$(MAKE) -e binsuidinstall
|
||||
@ -192,7 +195,7 @@ $OpenBSD: patch-Makefile_in,v 1.4 2007/04/09 20:50:57 kili Exp $
|
||||
echo "Installed UI config into $(ETC)/kismet_ui.conf.";
|
||||
@echo "Installed kismet into $(BIN)/."
|
||||
@echo "If you have not done so already, read the README file and the FAQ file. Additional"
|
||||
@@ -358,13 +358,11 @@ depend:
|
||||
@@ -367,13 +369,11 @@ depend:
|
||||
@$(MAKE) $(DEPEND)
|
||||
|
||||
$(DEPEND):
|
||||
@ -201,7 +204,7 @@ $OpenBSD: patch-Makefile_in,v 1.4 2007/04/09 20:50:57 kili Exp $
|
||||
@echo "Generating dependencies... "
|
||||
@echo > $(DEPEND)
|
||||
@$(CXX) $(CFLAGS) -MM \
|
||||
`echo $(PSO) $(DRONEO) $(GPSLO) $(NCO) | sed -e "s/\.o/\.cc/g"` >> $(DEPEND)
|
||||
`echo $(PSO) $(DRONEO) $(GPSLO) $(NCO) | sed -e "s/\.o/\.cc/g" | sed -e "s/\.mo/\.m/g"` >> $(DEPEND)
|
||||
-
|
||||
-include $(DEPEND)
|
||||
|
||||
|
@ -1,16 +1,16 @@
|
||||
$OpenBSD: patch-conf_kismet_conf_in,v 1.5 2007/04/09 20:50:57 kili Exp $
|
||||
--- conf/kismet.conf.in.orig Sat Jan 13 17:57:59 2007
|
||||
+++ conf/kismet.conf.in Tue Jan 16 20:37:15 2007
|
||||
@@ -10,7 +10,7 @@ version=2005.06.R1
|
||||
$OpenBSD: patch-conf_kismet_conf_in,v 1.6 2007/11/10 21:10:42 kili Exp $
|
||||
--- conf/kismet.conf.in.orig Sun Oct 7 17:48:51 2007
|
||||
+++ conf/kismet.conf.in Sun Oct 7 17:51:25 2007
|
||||
@@ -10,7 +10,7 @@ version=2007.09.R1
|
||||
servername=Kismet
|
||||
|
||||
# User to setid to (should be your normal user)
|
||||
-suiduser=your_user_here
|
||||
+suiduser=_kismet
|
||||
|
||||
# Sources are defined as:
|
||||
# source=sourcetype,interface,name[,initialchannel]
|
||||
@@ -19,6 +19,10 @@ suiduser=your_user_here
|
||||
# Do we try to put networkmanager to sleep? If you use NM, this is probably
|
||||
# what you want to do, so that it will leave the interfaces alone while
|
||||
@@ -24,6 +24,10 @@ networkmanagersleep=true
|
||||
# The initial channel is optional, if hopping is not enabled it can be used
|
||||
# to set the channel the interface listens on.
|
||||
# YOU MUST CHANGE THIS TO BE THE SOURCE YOU WANT TO USE
|
||||
@ -21,7 +21,7 @@ $OpenBSD: patch-conf_kismet_conf_in,v 1.5 2007/04/09 20:50:57 kili Exp $
|
||||
source=none,none,addme
|
||||
|
||||
# Comma-separated list of sources to enable. This is only needed if you defined
|
||||
@@ -175,7 +179,7 @@ writeinterval=300
|
||||
@@ -206,7 +210,7 @@ trackivs=false
|
||||
# server itself will play sound. Primarily for headless or automated systems.
|
||||
sound=false
|
||||
# Path to sound player
|
||||
@ -30,7 +30,7 @@ $OpenBSD: patch-conf_kismet_conf_in,v 1.5 2007/04/09 20:50:57 kili Exp $
|
||||
# Optional parameters to pass to the player
|
||||
# soundopts=--volume=.3
|
||||
# New network found
|
||||
@@ -229,7 +233,7 @@ metric=false
|
||||
@@ -264,7 +268,7 @@ metric=false
|
||||
# recent versions of GPSDrive's native support of Kismet.
|
||||
waypoints=false
|
||||
# GPSDrive waypoint file. This WILL be truncated.
|
||||
@ -39,7 +39,7 @@ $OpenBSD: patch-conf_kismet_conf_in,v 1.5 2007/04/09 20:50:57 kili Exp $
|
||||
# Do we want ESSID or BSSID as the waypoint name ?
|
||||
waypoint_essid=false
|
||||
|
||||
@@ -327,14 +331,14 @@ logdefault=Kismet
|
||||
@@ -362,14 +366,14 @@ logdefault=Kismet
|
||||
# crypt/Pok-Dec-20-01-1
|
||||
# and so on. The "dump", "crypt", etc, dirs must exist before kismet is run
|
||||
# in this case.
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-conf_kismet_ui_conf_in,v 1.1.1.1 2005/07/27 21:37:26 robert Exp $
|
||||
--- conf/kismet_ui.conf.in.orig Wed Jun 22 06:22:13 2005
|
||||
+++ conf/kismet_ui.conf.in Tue Jul 5 11:14:28 2005
|
||||
@@ -24,7 +24,7 @@ clientcolumns=decay,type,mac,manuf,data,
|
||||
$OpenBSD: patch-conf_kismet_ui_conf_in,v 1.2 2007/11/10 21:10:42 kili Exp $
|
||||
--- conf/kismet_ui.conf.in.orig Sun Sep 9 23:01:01 2007
|
||||
+++ conf/kismet_ui.conf.in Sun Sep 9 23:06:28 2007
|
||||
@@ -24,7 +24,7 @@ clientcolumns=decay,type,mac,manuf,data,crypt,size,ip,
|
||||
# noise on whatever host it's running on.
|
||||
sound=true
|
||||
# Path to sound player
|
||||
|
39
net/kismet/patches/patch-configure
Normal file
39
net/kismet/patches/patch-configure
Normal file
@ -0,0 +1,39 @@
|
||||
$OpenBSD: patch-configure,v 1.1 2007/11/10 21:10:42 kili Exp $
|
||||
--- configure.orig Sat Oct 6 23:32:15 2007
|
||||
+++ configure Fri Nov 9 14:13:43 2007
|
||||
@@ -8584,6 +8584,7 @@ echo "${ECHO_T}no" >&6; }
|
||||
|
||||
fi
|
||||
|
||||
+if false; then
|
||||
pkg_failed=no
|
||||
{ echo "$as_me:$LINENO: checking for DBUS" >&5
|
||||
echo $ECHO_N "checking for DBUS... $ECHO_C" >&6; }
|
||||
@@ -8621,9 +8622,8 @@ else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
fi
|
||||
-else
|
||||
- pkg_failed=untried
|
||||
fi
|
||||
+pkg_failed=untried
|
||||
|
||||
|
||||
|
||||
@@ -8663,6 +8663,7 @@ cat >>confdefs.h <<\_ACEOF
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
+fi
|
||||
|
||||
local=no
|
||||
# Check whether --enable-local-dumper was given.
|
||||
@@ -9836,7 +9837,7 @@ sharedatadir=`(
|
||||
test "$exec_prefix" = NONE && exec_prefix=${prefix}
|
||||
eval echo "$sharedatadir"
|
||||
)`
|
||||
-sharedatadir=${sharedatadir}
|
||||
+eval sharedatadir=${sharedatadir}
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile extra/buzzme/Makefile extra/Makefile conf/kismet.conf conf/kismet_ui.conf"
|
@ -1,47 +0,0 @@
|
||||
$OpenBSD: patch-scripts_kismet_in,v 1.2 2006/11/01 21:13:20 kili Exp $
|
||||
|
||||
# Kill some bashisms (doesn't help much, though).
|
||||
|
||||
--- scripts/kismet.in.orig Wed Jun 22 06:22:08 2005
|
||||
+++ scripts/kismet.in Sun Jun 26 12:22:44 2005
|
||||
@@ -7,8 +7,6 @@ BIN=@bindir@
|
||||
|
||||
GREP_OPTIONS=""
|
||||
|
||||
-set -m
|
||||
-
|
||||
gui=`grep -e "^gui=" ${ETC}/kismet_ui.conf | cut -d= -f2 | tr -d " \t"`
|
||||
piddir=`grep -e "^piddir=" ${ETC}/kismet.conf | cut -d= -f2 | tr -d " \t"`
|
||||
|
||||
@@ -61,21 +59,18 @@ servpid=$!
|
||||
echo "Waiting for server to start before starting UI..."
|
||||
sleep 4
|
||||
|
||||
-kill -0 $servpid 2>/dev/null
|
||||
-if test "$?" != "0" ; then
|
||||
- # Don't print anything here so that users don't get confused, just die and let
|
||||
- # them read the server fatal errors
|
||||
+exit_kismet() {
|
||||
+ kill -0 $servpid && echo Killing server... && kill $servpid
|
||||
+ echo Kismet exited.
|
||||
+}
|
||||
+
|
||||
+if kill -0 $servpid 2>/dev/null; then
|
||||
+ trap exit_kismet EXIT INT TERM
|
||||
+else
|
||||
+ # Don't print anything here so that users don't get confused,
|
||||
+ # just die and let them read the server fatal errors
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Starting UI..."
|
||||
${BIN}/kismet_client $client
|
||||
-
|
||||
-if test "$?" != "5"; then
|
||||
- echo "Killing server..."
|
||||
- kill $servpid
|
||||
- wait %-
|
||||
-fi
|
||||
-
|
||||
-echo "Kismet exited."
|
||||
-
|
@ -1,54 +0,0 @@
|
||||
$OpenBSD: patch-tcpserver_cc,v 1.1 2007/04/09 20:50:58 kili Exp $
|
||||
|
||||
# Always use int for file descriptors.
|
||||
|
||||
--- tcpserver.cc.orig Mon Nov 13 06:21:20 2006
|
||||
+++ tcpserver.cc Wed Jan 17 23:19:53 2007
|
||||
@@ -114,9 +114,9 @@ int TcpServer::Setup(unsigned int in_max
|
||||
// Make one useable fd_set from the fd's flagged for system-wide monitoring
|
||||
// and from the fd's flagged locally for clients connecting to us. This lets
|
||||
// us do 1 big unified select().
|
||||
-unsigned int TcpServer::MergeSet(fd_set in_set, unsigned int in_max,
|
||||
+int TcpServer::MergeSet(fd_set in_set, int in_max,
|
||||
fd_set *out_set, fd_set *outw_set) {
|
||||
- unsigned int max;
|
||||
+ int max;
|
||||
|
||||
FD_ZERO(out_set);
|
||||
FD_ZERO(outw_set);
|
||||
@@ -128,7 +128,7 @@ unsigned int TcpServer::MergeSet(fd_set
|
||||
max_fd = max;
|
||||
}
|
||||
|
||||
- for (unsigned int x = 0; x <= max; x++) {
|
||||
+ for (int x = 0; x <= max; x++) {
|
||||
if (FD_ISSET(x, &in_set) || FD_ISSET(x, &server_fds)) {
|
||||
FD_SET(x, out_set);
|
||||
}
|
||||
@@ -155,7 +155,7 @@ int TcpServer::Poll(fd_set& in_rset, fd_
|
||||
|
||||
// Accept an incoming connection
|
||||
int TcpServer::Accept() {
|
||||
- unsigned int new_fd;
|
||||
+ int new_fd;
|
||||
struct sockaddr_in client_addr;
|
||||
#ifdef HAVE_SOCKLEN_T
|
||||
socklen_t client_len;
|
||||
@@ -325,7 +325,7 @@ int TcpServer::SendToClient(int in_fd, i
|
||||
|
||||
int TcpServer::SendToAll(int in_refnum, const void *in_data) {
|
||||
int nsent = 0;
|
||||
- for (unsigned int x = serv_fd; x <= max_fd; x++) {
|
||||
+ for (int x = serv_fd; x <= max_fd; x++) {
|
||||
if (!FD_ISSET(x, &client_fds))
|
||||
continue;
|
||||
|
||||
@@ -659,7 +659,7 @@ void TcpServer::DelProtocolClient(int in
|
||||
int TcpServer::FetchNumClients() {
|
||||
int num = 0;
|
||||
|
||||
- for (unsigned int x = serv_fd + 1; x <= max_fd; x++) {
|
||||
+ for (int x = serv_fd + 1; x <= max_fd; x++) {
|
||||
if (FD_ISSET(x, &client_fds))
|
||||
num++;
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
$OpenBSD: patch-tcpserver_h,v 1.1 2007/04/09 20:50:58 kili Exp $
|
||||
|
||||
# Always use int for file descriptors.
|
||||
|
||||
--- tcpserver.h.orig Sun Feb 6 22:32:43 2005
|
||||
+++ tcpserver.h Wed Jan 17 23:19:10 2007
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
|
||||
int Setup(unsigned int in_max_clients, string bind_addr, short int in_port, vector<client_ipblock *> *in_ipb);
|
||||
|
||||
- unsigned int MergeSet(fd_set in_set, unsigned int in_max, fd_set *out_set,
|
||||
+ int MergeSet(fd_set in_set, int in_max, fd_set *out_set,
|
||||
fd_set *outw_set);
|
||||
|
||||
int FetchDescriptor() { return serv_fd; }
|
||||
@@ -169,7 +169,7 @@ protected:
|
||||
vector<client_ipblock *> *ipblock_vec;
|
||||
|
||||
// Socket items
|
||||
- unsigned int serv_fd;
|
||||
+ int serv_fd;
|
||||
struct sockaddr_in serv_sock;
|
||||
|
||||
// Master list of Fd's
|
||||
@@ -177,7 +177,7 @@ protected:
|
||||
|
||||
fd_set client_fds;
|
||||
|
||||
- unsigned int max_fd;
|
||||
+ int max_fd;
|
||||
|
||||
map<int, client_opt *> client_optmap;
|
||||
};
|
@ -1,63 +0,0 @@
|
||||
$OpenBSD: patch-tcpstreamer_cc,v 1.1 2007/04/09 20:50:58 kili Exp $
|
||||
|
||||
# Always use int for file descriptors.
|
||||
|
||||
--- tcpstreamer.cc.orig Thu May 26 16:51:45 2005
|
||||
+++ tcpstreamer.cc Wed Jan 17 23:34:42 2007
|
||||
@@ -115,9 +115,9 @@ int TcpStreamer::Setup(unsigned int in_m
|
||||
// Make one useable fd_set from the fd's flagged for system-wide monitoring
|
||||
// and from the fd's flagged locally for clients connecting to us. This lets
|
||||
// us do 1 big unified select().
|
||||
-unsigned int TcpStreamer::MergeSet(fd_set in_set, unsigned int in_max,
|
||||
+int TcpStreamer::MergeSet(fd_set in_set, int in_max,
|
||||
fd_set *out_set, fd_set *outw_set) {
|
||||
- unsigned int max;
|
||||
+ int max;
|
||||
|
||||
FD_ZERO(out_set);
|
||||
FD_ZERO(outw_set);
|
||||
@@ -129,7 +129,7 @@ unsigned int TcpStreamer::MergeSet(fd_se
|
||||
max_fd = max;
|
||||
}
|
||||
|
||||
- for (unsigned int x = 0; x <= max; x++) {
|
||||
+ for (int x = 0; x <= max; x++) {
|
||||
if (FD_ISSET(x, &in_set) || FD_ISSET(x, &server_fds)) {
|
||||
FD_SET(x, out_set);
|
||||
}
|
||||
@@ -156,7 +156,7 @@ int TcpStreamer::Poll(fd_set& in_rset, f
|
||||
// that complains about it
|
||||
uint8_t dptr[1024];
|
||||
int dlen, ret;
|
||||
- for (unsigned int x = 0; x <= max_fd; x++) {
|
||||
+ for (int x = 0; x <= max_fd; x++) {
|
||||
// Soak any data in the read buffer
|
||||
if (FD_ISSET(x, &in_rset) && FD_ISSET(x, &client_fds)) {
|
||||
int8_t buf;
|
||||
@@ -202,7 +202,7 @@ int TcpStreamer::Poll(fd_set& in_rset, f
|
||||
|
||||
// Accept an incoming connection
|
||||
int TcpStreamer::Accept() {
|
||||
- unsigned int new_fd;
|
||||
+ int new_fd;
|
||||
struct sockaddr_in client_addr;
|
||||
#ifdef HAVE_SOCKLEN_T
|
||||
socklen_t client_len;
|
||||
@@ -383,7 +383,7 @@ int TcpStreamer::WritePacket(const kis_p
|
||||
hdr.frame_len = (uint32_t) htonl(sizeof(struct stream_packet_header) + in_packet->caplen);
|
||||
|
||||
int nsent = 0;
|
||||
- for (unsigned int x = serv_fd; x <= max_fd; x++) {
|
||||
+ for (int x = serv_fd; x <= max_fd; x++) {
|
||||
if (!FD_ISSET(x, &client_fds))
|
||||
continue;
|
||||
|
||||
@@ -433,7 +433,7 @@ int TcpStreamer::WritePacket(const kis_p
|
||||
int TcpStreamer::FetchNumClients() {
|
||||
int num = 0;
|
||||
|
||||
- for (unsigned int x = serv_fd + 1; x <= max_fd; x++) {
|
||||
+ for (int x = serv_fd + 1; x <= max_fd; x++) {
|
||||
if (FD_ISSET(x, &client_fds))
|
||||
num++;
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
$OpenBSD: patch-tcpstreamer_h,v 1.1 2007/04/09 20:50:58 kili Exp $
|
||||
|
||||
# Always use int for file descriptors.
|
||||
|
||||
--- tcpstreamer.h.orig Thu May 26 16:51:45 2005
|
||||
+++ tcpstreamer.h Wed Jan 17 23:23:19 2007
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
|
||||
int Setup(unsigned int in_max_clients, string bind_addr, short int in_port, vector<client_ipblock *> *in_ipb);
|
||||
|
||||
- unsigned int MergeSet(fd_set in_set, unsigned int in_max, fd_set *out_set,
|
||||
+ int MergeSet(fd_set in_set, int in_max, fd_set *out_set,
|
||||
fd_set *outw_set);
|
||||
|
||||
int FetchDescriptor() { return serv_fd; }
|
||||
@@ -115,7 +115,7 @@ protected:
|
||||
vector<client_ipblock *> *ipblock_vec;
|
||||
|
||||
// Socket items
|
||||
- unsigned int serv_fd;
|
||||
+ int serv_fd;
|
||||
struct sockaddr_in serv_sock;
|
||||
|
||||
// Master list of Fd's
|
||||
@@ -123,7 +123,7 @@ protected:
|
||||
|
||||
fd_set client_fds;
|
||||
|
||||
- unsigned int max_fd;
|
||||
+ int max_fd;
|
||||
|
||||
GPSD *gpsd;
|
||||
};
|
Loading…
Reference in New Issue
Block a user