summaryrefslogtreecommitdiff
path: root/audio/daapd/patches/patch-ac
blob: 7cff9e08aaede3cc58b4d4c33f9db636f97d960e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
$NetBSD: patch-ac,v 1.3 2006/07/03 02:18:15 tron Exp $

--- libhttpd/src/select.h.orig	2006-03-05 14:00:38.000000000 +0000
+++ libhttpd/src/select.h	2006-07-03 03:10:45.000000000 +0100
@@ -81,7 +81,7 @@
 			c++;
 		}
 	
-		return 0;
+		return c;
 	}
 
 
@@ -154,7 +154,7 @@
 	
 	void erase( const int fDesc ) {
 		ClientIterator c;
-		if ((c = locateFDesc(fDesc)) != 0) {
+		if ((c = locateFDesc(fDesc)) != clientList.end()) {
 			clientList.erase(c);
 			close(fDesc);
 		}
@@ -162,14 +162,14 @@
 
 	void finish( const int fDesc ) {
 		ClientIterator c;
-		if ((c = locateFDesc(fDesc)) != 0) {
+		if ((c = locateFDesc(fDesc)) != clientList.end()) {
 			c->finished = true;
 		}
 	}
 
 	void address( const int fDesc, char address[HTTP_IP_ADDR_LEN] ) {
 		ClientIterator c;
-		if ((c = locateFDesc(fDesc)) != 0) {
+		if ((c = locateFDesc(fDesc)) != clientList.end()) {
 			strncpy(address, c->address, HTTP_IP_ADDR_LEN);
 		}
 	}
@@ -180,7 +180,7 @@
 
 	int readBuf(const int fDesc, char *destBuf, const uint len) {
 		ClientIterator c;
-		if ((c = locateFDesc(fDesc)) == 0) {
+		if ((c = locateFDesc(fDesc)) == clientList.end()) {
 			// printf("unknown client id %d\n", fDesc);
 			return 0;
 		}
@@ -192,7 +192,7 @@
 		
 	int readLine(const int fDesc, char *destBuf, const uint len) {
 		ClientIterator c;
-		if ((c = locateFDesc(fDesc)) == 0) {
+		if ((c = locateFDesc(fDesc)) == clientList.end()) {
 			// printf("unknown client id %d\n", fDesc);
 			return 0;
 		}
@@ -217,7 +217,7 @@
 	int handleWrite(int socket) {
 		int bytesWritten;
 		ClientIterator c;
-		if ((c = locateFDesc(socket)) == 0) {
+		if ((c = locateFDesc(socket)) == clientList.end()) {
 			// printf("unknown client id %d\n", socket);
 			return 2;
 		}
@@ -260,7 +260,7 @@
 			return 1;
 		} else {
 			ClientIterator c;
-			if ((c = locateFDesc(fDesc)) == 0) {
+			if ((c = locateFDesc(fDesc)) == clientList.end()) {
 				// printf("unknown client id %d\n", fDesc);
 				return 2;
 			}
@@ -304,7 +304,7 @@
 	
 	void doWrite(const int fDesc, const char* string, const uint len) {
 		ClientIterator c;
-		if ((c = locateFDesc(fDesc)) == 0) {
+		if ((c = locateFDesc(fDesc)) == clientList.end()) {
 			//printf("unknown client id %d\n", fDesc);
 			return;
 		}
@@ -318,7 +318,7 @@
 
 	void doWrite(const int fDesc, const char* string) {
 		ClientIterator c;
-		if ((c = locateFDesc(fDesc)) == 0) {
+		if ((c = locateFDesc(fDesc)) == clientList.end()) {
 			//printf("unknown client id %d\n", fDesc);
 			return;
 		}
@@ -351,7 +351,7 @@
 
 	void queueFile(const int socket, const int pendingFile ) {
 		ClientIterator c;
-		if ((c = locateFDesc(socket)) == 0) {
+		if ((c = locateFDesc(socket)) == clientList.end()) {
 			// printf("unknown client id %d\n", socket);
 			return;
 		}
@@ -360,7 +360,7 @@
 
 	void subscribe(const int fDesc) {
 		ClientIterator c;
-		if ((c = locateFDesc(fDesc)) == 0) {
+		if ((c = locateFDesc(fDesc)) == clientList.end()) {
 			//printf("unknown client id %d\n", fDesc);
 			return;
 		}