Page MenuHomeFreeBSD

uipc socket fix
ActivePublic

Authored by davide on Jul 17 2014, 3:56 AM.
Index: uipc_socket.c
===================================================================
--- uipc_socket.c (revision 268643)
+++ uipc_socket.c (working copy)
@@ -2548,7 +2548,10 @@
goto bad;
}
val = tvtosbt(tv);
-
+ printf("%ld\n", val);
+ if (val > INT_MAX) {
+ val = INT_MAX;
+ }
switch (sopt->sopt_name) {
case SO_SNDTIMEO:
so->so_snd.sb_timeo = val;
@@ -2698,10 +2701,9 @@
case SO_SNDTIMEO:
case SO_RCVTIMEO:
- optval = (sopt->sopt_name == SO_SNDTIMEO ?
+ tv = sbttotv(sopt->sopt_name == SO_SNDTIMEO ?
so->so_snd.sb_timeo : so->so_rcv.sb_timeo);
-
- tv = sbttotv(optval);
+ printf("%ld %ld", tv.tv_sec, tv.tv_usec);
#ifdef COMPAT_FREEBSD32
if (SV_CURPROC_FLAG(SV_ILP32)) {
struct timeval32 tv32;

Event Timeline

davide edited the content of this paste. (Show Details)Jul 17 2014, 3:56 AM
davide changed the title of this paste from untitled to uipc socket fix.
davide updated the paste's language from autodetect to autodetect.