#24 bug on the old linux which only support SO_TIMESTAMP

closed
None
5
2012-01-04
2011-12-14
Anonymous
No

function netInitTimestamping in net.c

It should add the following two lines between line 450 and line 451, so when setsockopt call success, netInitTimestamping return TRUE.

else
result = TRUE;

441 /* fallback method */
442 #if defined(SO_TIMESTAMP) /* Linux, Apple, FreeBSD */
443 if (!result) {
444 DBG("netInitTimestamping: trying to use SO_TIMESTAMP\n");
445
446 if (setsockopt(netPath->eventSock, SOL_SOCKET, SO_TIMESTAMP, &val, sizeof(int)) < 0
447 || setsockopt(netPath->generalSock, SOL_SOCKET, SO_TIMESTAMP, &val, sizeof(int)) < 0) {
448 PERROR("netInitTimestamping: failed to enable SO_TIMESTAMP");
449 result = FALSE;
450 }
451 }
452 #endif
453
454 return result;
455 }

zhangxijun

Discussion

  • This has been fixed for 2.2.0 release.
    Revision 162.

     
    • assigned_to: nobody --> gnn
    • status: open --> closed-fixed