View | Details | Raw Unified | Return to bug 166658
Collapse All | Expand All

(-)rplay/lib/Makefile.in (-2 / +2 lines)
Lines 13-20 Link Here
13
		$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
13
		$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
14
14
15
TARGET=		librp.a
15
TARGET=		librp.a
16
SRCS=		getopt.c getopt1.c hash.c strdup.c tilde.c xmalloc.c
16
SRCS=		hash.c tilde.c xmalloc.c
17
OBJS=		getopt.o getopt1.o hash.o strdup.o tilde.o xmalloc.o
17
OBJS=		hash.o tilde.o xmalloc.o
18
18
19
all:		$(TARGET)
19
all:		$(TARGET)
20
20
(-)rplay/rplayd/Makefile.in (-1 / +1 lines)
Lines 25-31 Link Here
25
		$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
25
		$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
26
26
27
LDFLAGS=	$(LD_OPTIONS) -L../librplay -lrplay -L../lib -lrp \
27
LDFLAGS=	$(LD_OPTIONS) -L../librplay -lrplay -L../lib -lrp \
28
		-L../adpcm -ladpcm @GSM_LIBS@ -L../rx -lrx @LDFLAGS@ @LIBS@ -lm
28
		-L../adpcm -ladpcm @GSM_LIBS@ @LDFLAGS@ @LIBS@ -lm
29
29
30
TARGET=		rplayd
30
TARGET=		rplayd
31
31
(-)rplay/rplayd/helper.c (-2 / +2 lines)
Lines 110-116 Link Here
110
	    done(1);
110
	    done(1);
111
	}
111
	}
112
	//memset ((char *) &hp->pattern, 0, sizeof (hp->pattern));
112
	//memset ((char *) &hp->pattern, 0, sizeof (hp->pattern));
113
	error = regncomp(&hp->pattern, pat, strlen(pat), REG_ICASE | REG_NOSUB);
113
	error = regcomp(&hp->pattern, pat, REG_EXTENDED | REG_ICASE | REG_NOSUB);
114
	if (error)
114
	if (error)
115
	{
115
	{
116
	    report(REPORT_ERROR, "helper_read: %d line %d\n", error, line);
116
	    report(REPORT_ERROR, "helper_read: %d line %d\n", error, line);
Lines 188-194 Link Here
188
188
189
    for (hp = helpers; hp; hp = hp->next)
189
    for (hp = helpers; hp; hp = hp->next)
190
    {
190
    {
191
	if (regnexec(&hp->pattern, sound, strlen(sound), 0, 0, 0) == 0)
191
	if (regexec(&hp->pattern, sound, 0, 0, 0) == 0)
192
	{
192
	{
193
	    return hp;
193
	    return hp;
194
	}
194
	}
(-)rplay/rplayd/host.c (-25 / +25 lines)
Lines 95-104 Link Here
95
    //memset ((char *) &access_write, 0, sizeof (access_write));
95
    //memset ((char *) &access_write, 0, sizeof (access_write));
96
    //memset ((char *) &access_execute, 0, sizeof (access_execute));
96
    //memset ((char *) &access_execute, 0, sizeof (access_execute));
97
97
98
    strcpy(expr_read, "^\\(");
98
    strcpy(expr_read, "^(");
99
    strcpy(expr_write, "^\\(");
99
    strcpy(expr_write, "^(");
100
    strcpy(expr_execute, "^\\(");
100
    strcpy(expr_execute, "^(");
101
    strcpy(expr_monitor, "^\\(");
101
    strcpy(expr_monitor, "^(");
102
102
103
    do
103
    do
104
    {
104
    {
Lines 162-168 Link Here
162
162
163
    if (strlen(expr_read) == 3)
163
    if (strlen(expr_read) == 3)
164
    {
164
    {
165
	strcat(expr_read, "\\)");
165
	strcat(expr_read, ")");
166
    }
166
    }
167
    else
167
    else
168
    {
168
    {
Lines 171-177 Link Here
171
    strcat(expr_read, "$");
171
    strcat(expr_read, "$");
172
    if (strlen(expr_write) == 3)
172
    if (strlen(expr_write) == 3)
173
    {
173
    {
174
	strcat(expr_write, "\\)");
174
	strcat(expr_write, ")");
175
    }
175
    }
176
    else
176
    else
177
    {
177
    {
Lines 180-186 Link Here
180
    strcat(expr_write, "$");
180
    strcat(expr_write, "$");
181
    if (strlen(expr_execute) == 3)
181
    if (strlen(expr_execute) == 3)
182
    {
182
    {
183
	strcat(expr_execute, "\\)");
183
	strcat(expr_execute, ")");
184
    }
184
    }
185
    else
185
    else
186
    {
186
    {
Lines 189-195 Link Here
189
    strcat(expr_execute, "$");
189
    strcat(expr_execute, "$");
190
    if (strlen(expr_monitor) == 3)
190
    if (strlen(expr_monitor) == 3)
191
    {
191
    {
192
	strcat(expr_monitor, "\\)");
192
	strcat(expr_monitor, ")");
193
    }
193
    }
194
    else
194
    else
195
    {
195
    {
Lines 197-231 Link Here
197
    }
197
    }
198
    strcat(expr_monitor, "$");
198
    strcat(expr_monitor, "$");
199
199
200
    error = regncomp(&access_read, expr_read, strlen(expr_read),
200
    error = regcomp(&access_read, expr_read,
201
		     REG_ICASE | REG_NOSUB);
201
		     REG_EXTENDED | REG_ICASE | REG_NOSUB);
202
    if (error)
202
    if (error)
203
    {
203
    {
204
	report(REPORT_ERROR, "host_read: regncomp: %d\n", error);
204
	report(REPORT_ERROR, "host_read: regcomp: %d\n", error);
205
	done(1);
205
	done(1);
206
    }
206
    }
207
207
208
    error = regncomp(&access_write, expr_write, strlen(expr_write),
208
    error = regcomp(&access_write, expr_write,
209
		     REG_ICASE | REG_NOSUB);
209
		     REG_EXTENDED | REG_ICASE | REG_NOSUB);
210
    if (error)
210
    if (error)
211
    {
211
    {
212
	report(REPORT_ERROR, "host_read: regncomp: %d\n", error);
212
	report(REPORT_ERROR, "host_read: regcomp: %d\n", error);
213
	done(1);
213
	done(1);
214
    }
214
    }
215
215
216
    error = regncomp(&access_execute, expr_execute, strlen(expr_execute),
216
    error = regcomp(&access_execute, expr_execute,
217
		     REG_ICASE | REG_NOSUB);
217
		     REG_EXTENDED | REG_ICASE | REG_NOSUB);
218
    if (error)
218
    if (error)
219
    {
219
    {
220
	report(REPORT_ERROR, "host_read: regncomp: %d\n", error);
220
	report(REPORT_ERROR, "host_read: regcomp: %d\n", error);
221
	done(1);
221
	done(1);
222
    }
222
    }
223
223
224
    error = regncomp(&access_monitor, expr_monitor, strlen(expr_monitor),
224
    error = regcomp(&access_monitor, expr_monitor,
225
		     REG_ICASE | REG_NOSUB);
225
		     REG_EXTENDED | REG_ICASE | REG_NOSUB);
226
    if (error)
226
    if (error)
227
    {
227
    {
228
	report(REPORT_ERROR, "host_read: regncomp: %d\n", error);
228
	report(REPORT_ERROR, "host_read: regcomp: %d\n", error);
229
	done(1);
229
	done(1);
230
    }
230
    }
231
}
231
}
Lines 354-375 Link Here
354
	{
354
	{
355
	case HOST_READ:
355
	case HOST_READ:
356
	    strcat(expr_read, re_name);
356
	    strcat(expr_read, re_name);
357
	    strcat(expr_read, "\\|");
357
	    strcat(expr_read, "|");
358
	    break;
358
	    break;
359
359
360
	case HOST_WRITE:
360
	case HOST_WRITE:
361
	    strcat(expr_write, re_name);
361
	    strcat(expr_write, re_name);
362
	    strcat(expr_write, "\\|");
362
	    strcat(expr_write, "|");
363
	    break;
363
	    break;
364
364
365
	case HOST_EXECUTE:
365
	case HOST_EXECUTE:
366
	    strcat(expr_execute, re_name);
366
	    strcat(expr_execute, re_name);
367
	    strcat(expr_execute, "\\|");
367
	    strcat(expr_execute, "|");
368
	    break;
368
	    break;
369
369
370
	case HOST_MONITOR:
370
	case HOST_MONITOR:
371
	    strcat(expr_monitor, re_name);
371
	    strcat(expr_monitor, re_name);
372
	    strcat(expr_monitor, "\\|");
372
	    strcat(expr_monitor, "|");
373
	    break;
373
	    break;
374
374
375
	default:
375
	default:
Lines 432-438 Link Here
432
	done(1);
432
	done(1);
433
    }
433
    }
434
434
435
    n = regnexec(re, p, strlen(p), 0, 0, 0);
435
    n = regexec(re, p, 0, 0, 0);
436
436
437
    return !n;
437
    return !n;
438
}
438
}
(-)rplay/rplayd/native.c (+1 lines)
Lines 32-37 Link Here
32
#include "rplayd.h"
32
#include "rplayd.h"
33
#include "native.h"
33
#include "native.h"
34
#include "ulaw.h"
34
#include "ulaw.h"
35
#include <string.h>
35
36
36
/* Native means 16-bit signed. */
37
/* Native means 16-bit signed. */
37
38
(-)rplay/rplayd/sound.c (-9 / +9 lines)
Lines 96-109 Link Here
96
96
97
    dirs = strdup(BAD_DIRS);	/* XXX */
97
    dirs = strdup(BAD_DIRS);	/* XXX */
98
98
99
    length = strlen("^\\(") + strlen("\\)") + strlen(dirs) + 1;
99
    length = strlen("^(") + strlen(")") + strlen(dirs) + 1;
100
100
101
    //length += strlen ("^");
101
    //length += strlen ("^");
102
    for (p = dirs; *p; p++)
102
    for (p = dirs; *p; p++)
103
    {
103
    {
104
	if (*p == ':')
104
	if (*p == ':')
105
	{
105
	{
106
	    length += strlen("\\|") - strlen(":");
106
	    length += strlen("|") - strlen(":");
107
	}
107
	}
108
    }
108
    }
109
109
Lines 119-125 Link Here
119
    }
119
    }
120
120
121
    first = 1;
121
    first = 1;
122
    strcpy(buf, "^\\(");
122
    strcpy(buf, "^(");
123
    while (p = (char *) strtok(first ? dirs : 0, ":"))
123
    while (p = (char *) strtok(first ? dirs : 0, ":"))
124
    {
124
    {
125
	if (first)
125
	if (first)
Lines 129-140 Link Here
129
	}
129
	}
130
	else
130
	else
131
	{
131
	{
132
	    //strcat (buf, "\\|^");
132
	    //strcat (buf, "|^");
133
	    strcat(buf, "\\|");
133
	    strcat(buf, "|");
134
	}
134
	}
135
	strcat(buf, p);
135
	strcat(buf, p);
136
    }
136
    }
137
    strcat(buf, "\\)");
137
    strcat(buf, ")");
138
138
139
#if 0
139
#if 0
140
    report(REPORT_DEBUG, "bad_dirs=%s, strlen=%d, length=%d\n",
140
    report(REPORT_DEBUG, "bad_dirs=%s, strlen=%d, length=%d\n",
Lines 143-151 Link Here
143
143
144
    //memset ((char *) &bad_dirs, 0, sizeof (bad_dirs));
144
    //memset ((char *) &bad_dirs, 0, sizeof (bad_dirs));
145
145
146
    if (regncomp(&bad_dirs, buf, strlen(buf), REG_ICASE | REG_NOSUB))
146
    if (regcomp(&bad_dirs, buf, REG_EXTENDED | REG_ICASE | REG_NOSUB))
147
    {
147
    {
148
	report(REPORT_ERROR, "bad_dirs: regncomp failed\n");
148
	report(REPORT_ERROR, "bad_dirs: regcomp failed\n");
149
	done(1);
149
	done(1);
150
    }
150
    }
151
151
Lines 162-168 Link Here
162
#endif
162
#endif
163
{
163
{
164
    /* return 1 if bad */
164
    /* return 1 if bad */
165
    return regnexec(&bad_dirs, dir, strlen(dir), 0, 0, 0) ? 0 : 1;
165
    return regexec(&bad_dirs, dir, 0, 0, 0) ? 0 : 1;
166
}
166
}
167
167
168
#endif /* BAD_DIRS */
168
#endif /* BAD_DIRS */

Return to bug 166658