IP to Geo

IP to Geo Commit Details

Date:2016-02-17 18:15:04 (4 years 5 months ago)
Author:Grégory Soutadé
Branch:master
Commit:978f9335f0374590b1e087bee2852f85ab2e55ad
Parents: 4b791be9f6806b666c64b75d1aea6662c1271a25
Message:Forgot to replace one ctx nb_sockets variable by nb_sockets

Changes:
Msrc/server.c (4 diffs)

File differences

src/server.c
2727
2828
2929
30
30
3131
3232
3333
......
3939
4040
4141
42
42
4343
4444
4545
......
264264
265265
266266
267
267
268268
269269
270270
......
279279
280280
281281
282
282
283283
284284
285285
typedef struct {
int socket;
time_t timeout;
time_t timeout; // in µs
int nb_remaining_requests;
} socket_ctx_t;
int nb_cur_sockets;
int nb_available_sockets;
int max_timeout;
int max_sockets;
int max_sockets; // in ms
int stop;
int quiet;
pthread_mutex_t mutex;
{
timersub(&time2, &time1, &time_res);
poll_idx = -1;
for(i=0; i<ctx->nb_cur_sockets; i++)
for(i=0; i<nb_cur_sockets; i++)
{
if (ctx->sockets[i].timeout < 0) continue;
poll_idx++;
if (ctx->pollfds[poll_idx].revents & POLL_ERR_MASK)
{
if (ctx->quiet < 0)
syslog(LOG_ERR, "Error with socket %d", ctx->sockets[i].socket);
syslog(LOG_ERR, "Error (or closed) socket %d", ctx->sockets[i].socket);
close_socket(&ctx->sockets[i]);
}
// Someone is speaking

Archive Download the corresponding diff file

Branches

Tags