...
 
Commits (1)
  • Rob Swindell's avatar
    Fix bug with Socket.getoption() of byte-sized options · 30d40911
    Rob Swindell authored
    Only observed on Windows, the option value variable (val) was uninitialized so querying byte-sized options using WinSock getsockopt() would leave the MSB of the value as undefined (garbage), resulting in sockinfo.js output like this:
    KEEPALIVE = -858993663
    instead of this:
    KEEPALIVE = 1
    30d40911
......@@ -1515,8 +1515,8 @@ js_getsockopt(JSContext *cx, uintN argc, jsval *arglist)
JSObject *obj=JS_THIS_OBJECT(cx, arglist);
jsval *argv=JS_ARGV(cx, arglist);
int opt;
int level;
int val;
int level = 0;
int val = 0;
js_socket_private_t* p;
LINGER linger;
void* vp=&val;
......