Skip to content

Instantly share code, notes, and snippets.

commit ab852fb4a6b6bb55e82c8cf95f91f37e1a98065f
Author: Saúl Ibarra Corretgé <[email protected]>
Date: Thu Apr 23 16:54:09 2015 +0200
unix: make sure we make an extra loop iteration after uv_pipe_connect
diff --git a/src/unix/pipe.c b/src/unix/pipe.c
index e0f448e..37dff37 100644
--- a/src/unix/pipe.c
+++ b/src/unix/pipe.c
diff --git a/src/unix/internal.h b/src/unix/internal.h
index 03a9226..b2f1a41 100644
--- a/src/unix/internal.h
+++ b/src/unix/internal.h
@@ -86,7 +86,7 @@
#endif
#if defined(__linux__)
-# define UV__POLLIN UV__EPOLLIN
+# define UV__POLLIN (UV__EPOLLIN | UV__EPOLLPRI)
diff --git a/src/fs-poll.c b/src/fs-poll.c
index 0de15b1..e365af4 100644
--- a/src/fs-poll.c
+++ b/src/fs-poll.c
@@ -225,19 +225,19 @@ static void timer_close_cb(uv_handle_t* handle) {
static int statbuf_eq(const uv_stat_t* a, const uv_stat_t* b) {
return a->st_ctim.tv_nsec == b->st_ctim.tv_nsec
- && a->st_mtim.tv_nsec == b->st_mtim.tv_nsec
- && a->st_birthtim.tv_nsec == b->st_birthtim.tv_nsec
@saghul
saghul / gist:68dd0c24c3ec1f68c88d
Created December 19, 2014 16:00
PJSIP crash on SDP parsing
Compiled by default (-O2)
>>> 16:54:39.466 pjsua_core.c .RX 392 bytes Request msg INVITE/cseq=1 (rdata0x1b30538) from UDP 192.168.1.21:5060:
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.21:5060;branch=z9hG4bK-73732-1-0
From: sipp <sip:[email protected]:5060>;tag=73732SIPpTag001
To: sut <sip:[email protected]:5060>
Call-ID: [email protected]
CSeq: 1 INVITE
Contact: sip:[email protected]:5060
2014-10-22 11:19:48.346783 [blink 26767]: SENDING: Packet 148, +0:00:16.379876
192.168.99.54:52204 -(SIP over TLS)-> 85.17.186.7:5061
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/TLS 192.168.99.54:52204;rport;branch=z9hG4bKPjcdSau6dP9HP9nAbH.dZ8Rcurw7ductlq;alias
Max-Forwards: 70
From: "saghul" <sip:[email protected]>;tag=ez3hclMmwlYmlUpAhzPxJYQynhPQlJGK
To: <sip:[email protected]>
Contact: <sip:[email protected]:52650;transport=tls>
Call-ID: .EuHOMb6BINO1ojvtakhIVu--3.k46ka
CSeq: 24728 INVITE
INVITE sip:[email protected]:60910;transport=tls SIP/2.0
Via: SIP/2.0/TLS 192.168.99.54:50470;rport;branch=z9hG4bKPjCDAtevFuQRZkn3qzYP6EDla6oVecEToU;alias
Max-Forwards: 70
From: "saghul" <sip:[email protected]>;tag=jnX7Q52idMSMufnJZaUFpPC01SzuwPBZ
To: <sip:[email protected]>
Contact: <sip:[email protected]:53688;transport=tls>
Call-ID: cxfhqVs71Z6yVg14uzPhFEukeZri3W2g
CSeq: 22757 INVITE
Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Supported: 100rel, replaces, norefersub, gruu
diff --git a/crypto/include/integers.h b/crypto/include/integers.h
index a71753a..c0836dd 100644
--- a/crypto/include/integers.h
+++ b/crypto/include/integers.h
@@ -54,6 +54,10 @@
#else /* SRTP_KERNEL */
+#ifdef HAVE_CONFIG_H
+# include <config.h>
@saghul
saghul / t.js
Created September 22, 2014 09:52
var constants = require('constants');
process.stdin.on('error', function(error) {
if (error.errno == constants.EBADF)
console.log('stdin is unusable');
else
console.log('stdin error! ' + error);
});
process.stdin.resume()
@saghul
saghul / t.js
Created September 22, 2014 08:32
var constants = require('constants');
process.stdin.on('error', function(error) {
if (error.errno == constants.EBADF)
console.log('stdin is unusable');
else
console.log('stdin error! ' + error);
});
process.stdin.resume()
@saghul
saghul / tmp.txt
Created September 18, 2014 17:24
7ff52b8 unix, windows: don't allow a NULL callback on timers
4ca9a36 unix, windows: add uv_fileno
ab2c442 fs: introduce uv_readdir_next() and report types
0ecee21 unix, windows: add uv_recv_buffer_size and uv_send_buffer_size
02e1ebd include: remove unneeded EADDRINFO errno
2e9d86e windows: add uv_backend_timeout
e99b89f unix, windows: add uv_fs_mkdtemp
cdc979d aix: improve AIX compatibility
960eefb unix: guarantee write queue cb execution order in streams
0d43992 unix, win: add uv_udp_try_send