Index: trunk/extensions/PoolCounter/daemon/locks.c |
— | — | @@ -44,6 +44,10 @@ |
45 | 45 | |
46 | 46 | char* process_line(struct client_data* cli_data, char* line, int line_len) { |
47 | 47 | struct locks* l = &cli_data->client_locks; |
| 48 | + if (line_len > 0 && line[line_len-1] == '\r') { |
| 49 | + line_len--; |
| 50 | + line[line_len] = '\0'; |
| 51 | + } |
48 | 52 | |
49 | 53 | if ( !strncmp( line, "ACQ4ME ", 7 ) || !strncmp( line, "ACQ4ANY ", 8 ) ) { |
50 | 54 | if ( l->state != UNLOCKED ) { |
Index: trunk/extensions/PoolCounter/daemon/Makefile |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | CC=gcc |
3 | 3 | DEFINES=-DENDIAN_BIG=0 -DENDIAN_LITTLE=1 -DHAVE_ACCEPT4=1 |
4 | | -CFLAGS=-std=c90 -Wall $(DEFINES) |
| 4 | +CFLAGS=-Wall $(DEFINES) |
5 | 5 | OBJS=main.o client_data.o locks.o hash.o |
6 | 6 | LINK=-levent |
7 | 7 | HEADERS=prototypes.h client_data.h |