You can subscribe to this list here.
2005 |
Jan
|
Feb
(32) |
Mar
(56) |
Apr
(92) |
May
(39) |
Jun
(226) |
Jul
(98) |
Aug
(66) |
Sep
|
Oct
(153) |
Nov
(43) |
Dec
(42) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(97) |
Feb
(141) |
Mar
(147) |
Apr
(80) |
May
(51) |
Jun
(93) |
Jul
(88) |
Aug
(50) |
Sep
(179) |
Oct
(48) |
Nov
(82) |
Dec
(71) |
2007 |
Jan
(42) |
Feb
(46) |
Mar
(123) |
Apr
(21) |
May
(139) |
Jun
(59) |
Jul
(34) |
Aug
(57) |
Sep
(47) |
Oct
(137) |
Nov
(49) |
Dec
(12) |
2008 |
Jan
(10) |
Feb
(8) |
Mar
(63) |
Apr
(17) |
May
(34) |
Jun
(38) |
Jul
(16) |
Aug
(62) |
Sep
(9) |
Oct
(121) |
Nov
(38) |
Dec
(4) |
2009 |
Jan
|
Feb
(11) |
Mar
(9) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(4) |
Apr
(10) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(12) |
2012 |
Jan
(26) |
Feb
(1) |
Mar
(15) |
Apr
(1) |
May
(1) |
Jun
(7) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
(52) |
Nov
(8) |
Dec
(25) |
2013 |
Jan
(35) |
Feb
(14) |
Mar
(10) |
Apr
(10) |
May
(29) |
Jun
(16) |
Jul
(5) |
Aug
(8) |
Sep
(8) |
Oct
(6) |
Nov
(1) |
Dec
(3) |
2014 |
Jan
(16) |
Feb
(13) |
Mar
(5) |
Apr
(9) |
May
(21) |
Jun
(6) |
Jul
(5) |
Aug
(2) |
Sep
(59) |
Oct
(115) |
Nov
(122) |
Dec
(45) |
2015 |
Jan
(31) |
Feb
(32) |
Mar
(19) |
Apr
(25) |
May
(3) |
Jun
(4) |
Jul
(18) |
Aug
(3) |
Sep
(23) |
Oct
(11) |
Nov
(17) |
Dec
(12) |
2016 |
Jan
(20) |
Feb
(27) |
Mar
(20) |
Apr
(40) |
May
(35) |
Jun
(48) |
Jul
(44) |
Aug
(51) |
Sep
(18) |
Oct
(42) |
Nov
(39) |
Dec
(29) |
2017 |
Jan
(37) |
Feb
(34) |
Mar
(20) |
Apr
(37) |
May
(10) |
Jun
(2) |
Jul
(14) |
Aug
(15) |
Sep
(25) |
Oct
(29) |
Nov
(15) |
Dec
(29) |
2018 |
Jan
(5) |
Feb
(15) |
Mar
(6) |
Apr
(20) |
May
(39) |
Jun
(39) |
Jul
(17) |
Aug
(20) |
Sep
(10) |
Oct
(17) |
Nov
(20) |
Dec
(8) |
2019 |
Jan
(28) |
Feb
(21) |
Mar
(13) |
Apr
(44) |
May
(44) |
Jun
(28) |
Jul
(51) |
Aug
(30) |
Sep
(7) |
Oct
(20) |
Nov
(8) |
Dec
(21) |
2020 |
Jan
(27) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Vlad S. <ser...@us...> - 2005-06-10 13:53:28
|
Update of /cvsroot/naviserver/naviserver/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28795/tests Modified Files: tclresp.test Log Message: updated to deal with -binary flag Index: tclresp.test =================================================================== RCS file: /cvsroot/naviserver/naviserver/tests/tclresp.test,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tclresp.test 27 Apr 2005 00:17:54 -0000 1.2 --- tclresp.test 10 Jun 2005 13:53:19 -0000 1.3 *************** *** 34,38 **** test tclresp-1.3.1 {basic syntax} -body { ns_respond -x ! } -returnCodes error -result {wrong # args: should be "ns_respond ?-status status? ?-type type? ?-length length? ?-headers headers? ?-string string? ?-file file? ?-fileid fileid?"} test tclresp-1.3.2 {basic syntax} -body { --- 34,38 ---- test tclresp-1.3.1 {basic syntax} -body { ns_respond -x ! } -returnCodes error -result {wrong # args: should be "ns_respond ?-status status? ?-type type? ?-length length? ?-headers headers? ?-string string? ?-file file? ?-fileid fileid? ?-binary binary?"} test tclresp-1.3.2 {basic syntax} -body { *************** *** 42,46 **** test tclresp-1.3.3 {basic syntax} -body { ns_respond -string x -file y ! } -returnCodes error -result {must specify only one of -string, -file or -fileid} test tclresp-1.3.4 {basic syntax} -body { --- 42,46 ---- test tclresp-1.3.3 {basic syntax} -body { ns_respond -string x -file y ! } -returnCodes error -result {must specify only one of -string, -file, -binary or -fileid} test tclresp-1.3.4 {basic syntax} -body { |
From: Zoran V. <vas...@us...> - 2005-06-10 10:12:50
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8702 Modified Files: binder.c Log Message: First pass: reformatted and untabified. Index: binder.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/binder.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** binder.c 24 Feb 2005 17:24:52 -0000 1.3 --- binder.c 10 Jun 2005 10:12:36 -0000 1.4 *************** *** 1,7 **** /* ! * The contents of this file are subject to the AOLserver Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at ! * http://aolserver.com/. * * Software distributed under the License is distributed on an "AS IS" --- 1,7 ---- /* ! * The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at ! * http://mozilla.org/. * * Software distributed under the License is distributed on an "AS IS" *************** *** 32,36 **** * binder.c -- * ! *Support for pre-bound privileged ports. */ --- 32,36 ---- * binder.c -- * ! * Support for pre-bound privileged ports. */ *************** *** 43,47 **** --- 43,51 ---- */ + + #ifndef _WIN32 static void PreBind(char *line); + #endif + static Tcl_HashTable preboundTcp; static Tcl_HashTable preboundUdp; *************** *** 51,55 **** - /* *---------------------------------------------------------------------- --- 55,58 ---- *************** *** 57,68 **** * Ns_SockListenEx -- * ! * Create a new socket bound to the specified port and listening ! * for new connections. * * Results: ! * Socket descriptor or -1 on error. * * Side effects: ! * None. * *---------------------------------------------------------------------- --- 60,71 ---- * Ns_SockListenEx -- * ! * Create a new socket bound to the specified port and listening ! * for new connections. * * Results: ! * Socket descriptor or -1 on error. * * Side effects: ! * None. * *---------------------------------------------------------------------- *************** *** 77,101 **** if (Ns_GetSockAddr(&sa, address, port) != NS_OK) { ! return -1; } Ns_MutexLock(&lock); hPtr = Tcl_FindHashEntry(&preboundTcp, (char *) &sa); if (hPtr != NULL) { ! sock = (int) Tcl_GetHashValue(hPtr); ! Tcl_DeleteHashEntry(hPtr); } Ns_MutexUnlock(&lock); if (hPtr == NULL) { ! sock = Ns_SockBind(&sa); } if (sock != -1 && listen(sock, backlog) != 0) { ! err = errno; ! close(sock); ! errno = err; ! sock = -1; } return sock; } /* *---------------------------------------------------------------------- --- 80,106 ---- if (Ns_GetSockAddr(&sa, address, port) != NS_OK) { ! return -1; } Ns_MutexLock(&lock); hPtr = Tcl_FindHashEntry(&preboundTcp, (char *) &sa); if (hPtr != NULL) { ! sock = (int) Tcl_GetHashValue(hPtr); ! Tcl_DeleteHashEntry(hPtr); } Ns_MutexUnlock(&lock); if (hPtr == NULL) { ! sock = Ns_SockBind(&sa); } if (sock != -1 && listen(sock, backlog) != 0) { ! err = errno; ! close(sock); ! errno = err; ! sock = -1; } + return sock; } + /* *---------------------------------------------------------------------- *************** *** 103,113 **** * Ns_SockBindUdp -- * ! * Create a UDP socket and bind it to the passed-in address. * * Results: ! * Socket descriptor or -1 on error. * * Side effects: ! * None. * *---------------------------------------------------------------------- --- 108,118 ---- * Ns_SockBindUdp -- * ! * Create a UDP socket and bind it to the passed-in address. * * Results: ! * Socket descriptor or -1 on error. * * Side effects: ! * None. * *---------------------------------------------------------------------- *************** *** 119,133 **** int sock, err, n = 1; ! if((sock = socket(AF_INET,SOCK_DGRAM,0)) < 0 || ! setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &n, sizeof(n)) < 0 || ! bind(sock,(struct sockaddr *)saPtr,sizeof(struct sockaddr_in)) < 0) { ! err = errno; ! close(sock); ! Ns_SetSockErrno(err); ! sock = -1; } return sock; } /* *---------------------------------------------------------------------- --- 124,142 ---- int sock, err, n = 1; ! sock = socket(AF_INET,SOCK_DGRAM, 0); ! ! if (sock < 0 ! || setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &n, sizeof(n)) < 0 ! || bind(sock,(struct sockaddr *)saPtr, sizeof(struct sockaddr_in)) < 0) { ! err = errno; ! close(sock); ! Ns_SetSockErrno(err); ! sock = -1; } + return sock; } + /* *---------------------------------------------------------------------- *************** *** 135,145 **** * Ns_SockRaw -- * ! * Helper routine for creating a raw socket * * Results: ! * Socket descriptor or -1 on error. * * Side effects: ! * None. * *---------------------------------------------------------------------- --- 144,154 ---- * Ns_SockRaw -- * ! * Helper routine for creating a raw socket * * Results: ! * Socket descriptor or -1 on error. * * Side effects: ! * None. * *---------------------------------------------------------------------- *************** *** 151,163 **** int sock, err; ! if((sock = socket(AF_INET,SOCK_RAW,proto)) < 0) { ! err = errno; ! close(sock); ! Ns_SetSockErrno(err); ! sock = -1; } return sock; } /* *---------------------------------------------------------------------- --- 160,176 ---- int sock, err; ! sock = socket(AF_INET,SOCK_RAW, proto); ! ! if (sock < 0) { ! err = errno; ! close(sock); ! Ns_SetSockErrno(err); ! sock = -1; } + return sock; } + /* *---------------------------------------------------------------------- *************** *** 165,176 **** * Ns_SockListenUdp -- * ! * Create a new UDP socket bound to the specified port and listening ! * for new connections. * * Results: ! * Socket descriptor or -1 on error. * * Side effects: ! * None. * *---------------------------------------------------------------------- --- 178,189 ---- * Ns_SockListenUdp -- * ! * Create a new UDP socket bound to the specified port and ! * listening for new connections. * * Results: ! * Socket descriptor or -1 on error. * * Side effects: ! * None. * *---------------------------------------------------------------------- *************** *** 185,203 **** if (Ns_GetSockAddr(&sa, address, port) != NS_OK) { ! return -1; } Ns_MutexLock(&lock); hPtr = Tcl_FindHashEntry(&preboundUdp, (char *) &sa); if (hPtr != NULL) { ! sock = (int) Tcl_GetHashValue(hPtr); ! Tcl_DeleteHashEntry(hPtr); } Ns_MutexUnlock(&lock); if (hPtr == NULL) { ! sock = Ns_SockBindUdp(&sa); } return sock; } /* *---------------------------------------------------------------------- --- 198,218 ---- if (Ns_GetSockAddr(&sa, address, port) != NS_OK) { ! return -1; } Ns_MutexLock(&lock); hPtr = Tcl_FindHashEntry(&preboundUdp, (char *) &sa); if (hPtr != NULL) { ! sock = (int) Tcl_GetHashValue(hPtr); ! Tcl_DeleteHashEntry(hPtr); } Ns_MutexUnlock(&lock); if (hPtr == NULL) { ! sock = Ns_SockBindUdp(&sa); } + return sock; } + /* *---------------------------------------------------------------------- *************** *** 205,215 **** * Ns_SockListenRaw -- * ! * Create a new RAW socket * * Results: ! * Socket descriptor or -1 on error. * * Side effects: ! * None. * *---------------------------------------------------------------------- --- 220,230 ---- * Ns_SockListenRaw -- * ! * Create a new RAW socket * * Results: ! * Socket descriptor or -1 on error. * * Side effects: ! * None. * *---------------------------------------------------------------------- *************** *** 226,233 **** hPtr = Tcl_FirstHashEntry(&preboundRaw, &search); while (hPtr != NULL) { ! if(proto == (int)Tcl_GetHashValue(hPtr)) { ! sock = (int)Tcl_GetHashKey(&preboundRaw, hPtr); ! Tcl_DeleteHashEntry(hPtr); ! break; } hPtr = Tcl_NextHashEntry(&search); --- 241,248 ---- hPtr = Tcl_FirstHashEntry(&preboundRaw, &search); while (hPtr != NULL) { ! if (proto == (int)Tcl_GetHashValue(hPtr)) { ! sock = (int)Tcl_GetHashKey(&preboundRaw, hPtr); ! Tcl_DeleteHashEntry(hPtr); ! break; } hPtr = Tcl_NextHashEntry(&search); *************** *** 235,255 **** Ns_MutexUnlock(&lock); if (hPtr == NULL) { ! sock = Ns_SockRaw(proto); } return sock; } /* *---------------------------------------------------------------------- * ! * ListenUnix -- * ! * Helper routine for creating a listening UNIX domain socket. * * Results: ! * Socket descriptor or -1 on error. * * Side effects: ! * None. * *---------------------------------------------------------------------- --- 250,272 ---- Ns_MutexUnlock(&lock); if (hPtr == NULL) { ! sock = Ns_SockRaw(proto); } + return sock; } + /* *---------------------------------------------------------------------- * ! * Ns_SockListenUnix -- * ! * Helper routine for creating a listening UNIX domain socket. * * Results: ! * Socket descriptor or -1 on error. * * Side effects: ! * None. * *---------------------------------------------------------------------- *************** *** 262,276 **** struct sockaddr_un addr; ! memset(&addr,0,sizeof(addr)); addr.sun_family = AF_UNIX; ! strncpy(addr.sun_path,path,sizeof(addr.sun_path)-1); unlink(path); ! if((sock = socket(AF_UNIX,SOCK_STREAM,0)) < 0 || ! bind(sock,(struct sockaddr*)&addr,sizeof(addr)) < 0) { ! err = errno; ! close(sock); ! Ns_SetSockErrno(err); ! sock = -1; } return sock; } --- 279,296 ---- struct sockaddr_un addr; ! memset(&addr, 0, sizeof(addr)); addr.sun_family = AF_UNIX; ! strncpy(addr.sun_path,path, sizeof(addr.sun_path) - 1); unlink(path); ! ! sock = socket(AF_UNIX,SOCK_STREAM, 0); ! if (sock < 0 ! || bind(sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) { ! err = errno; ! close(sock); ! Ns_SetSockErrno(err); ! sock = -1; } + return sock; } *************** *** 282,292 **** * NsInitBinder -- * ! * Initialize the pre-bind table. * * Results: ! * None. * * Side effects: ! * None. * *---------------------------------------------------------------------- --- 302,312 ---- * NsInitBinder -- * ! * Initialize the pre-bind table. * * Results: ! * None. * * Side effects: ! * None. * *---------------------------------------------------------------------- *************** *** 302,305 **** --- 322,327 ---- } + #ifndef _WIN32 + /* *************** *** 308,318 **** * NsPreBind -- * ! * Pre-bind any requested ports, called from Ns_Main at startup. * * Results: ! * None. * * Side effects: ! * May pre-bind to one or more ports. * *---------------------------------------------------------------------- --- 330,340 ---- * NsPreBind -- * ! * Pre-bind any requested ports, called from Ns_Main at startup. * * Results: ! * None. * * Side effects: ! * May pre-bind to one or more ports. * *---------------------------------------------------------------------- *************** *** 326,336 **** if (args != NULL) { ! PreBind(args); } if (file != NULL && (fp = fopen(file, "r")) != NULL) { ! while (fgets(line, sizeof(line), fp) != NULL) { ! PreBind(line); ! } ! fclose(fp); } } --- 348,358 ---- if (args != NULL) { ! PreBind(args); } if (file != NULL && (fp = fopen(file, "r")) != NULL) { ! while (fgets(line, sizeof(line), fp) != NULL) { ! PreBind(line); ! } ! fclose(fp); } } *************** *** 342,352 **** * NsClosePreBound -- * ! * Close any remaining pre-bound sockets. * * Results: ! * None. * * Side effects: ! * Pre-bound sockets closed. * *---------------------------------------------------------------------- --- 364,374 ---- * NsClosePreBound -- * ! * Close any remaining pre-bound sockets. * * Results: ! * None. * * Side effects: ! * Pre-bound sockets closed. * *---------------------------------------------------------------------- *************** *** 361,410 **** int port, sock; struct sockaddr_in *saPtr; ! Ns_MutexLock(&lock); hPtr = Tcl_FirstHashEntry(&preboundTcp, &search); while (hPtr != NULL) { ! saPtr = (struct sockaddr_in *) Tcl_GetHashKey(&preboundTcp, hPtr); ! addr = ns_inet_ntoa(saPtr->sin_addr); ! port = htons(saPtr->sin_port); ! sock = (int)Tcl_GetHashValue(hPtr); ! Ns_Log(Warning, "prebind: closed unused TCP: %s:%d = %d", addr, port, sock); ! close(sock); ! hPtr = Tcl_NextHashEntry(&search); } Tcl_DeleteHashTable(&preboundTcp); Tcl_InitHashTable(&preboundTcp, sizeof(struct sockaddr_in)/sizeof(int)); hPtr = Tcl_FirstHashEntry(&preboundUdp, &search); while (hPtr != NULL) { ! saPtr = (struct sockaddr_in *) Tcl_GetHashKey(&preboundUdp, hPtr); ! addr = ns_inet_ntoa(saPtr->sin_addr); ! port = htons(saPtr->sin_port); ! sock = (int)Tcl_GetHashValue(hPtr); ! Ns_Log(Warning, "prebind: closed unused UDP: %s:%d = %d", addr, port, sock); ! close(sock); ! hPtr = Tcl_NextHashEntry(&search); } Tcl_DeleteHashTable(&preboundUdp); Tcl_InitHashTable(&preboundUdp, sizeof(struct sockaddr_in)/sizeof(int)); hPtr = Tcl_FirstHashEntry(&preboundRaw, &search); while (hPtr != NULL) { ! sock = (int)Tcl_GetHashKey(&preboundRaw, hPtr); ! port = (int)Tcl_GetHashValue(hPtr); ! Ns_Log(Warning, "prebind: closed unused RAW: %d = %d", port, sock); ! close(sock); ! hPtr = Tcl_NextHashEntry(&search); } Tcl_DeleteHashTable(&preboundRaw); Tcl_InitHashTable(&preboundRaw, TCL_ONE_WORD_KEYS); hPtr = Tcl_FirstHashEntry(&preboundUnix, &search); while (hPtr != NULL) { ! addr = (char *) Tcl_GetHashKey(&preboundUnix, hPtr); ! sock = (int)Tcl_GetHashValue(hPtr); ! Ns_Log(Warning, "prebind: closed unused Unix: %s = %d", addr, sock); ! close(sock); ! hPtr = Tcl_NextHashEntry(&search); } Tcl_DeleteHashTable(&preboundUnix); Tcl_InitHashTable(&preboundUnix, TCL_STRING_KEYS); Ns_MutexUnlock(&lock); } --- 383,437 ---- int port, sock; struct sockaddr_in *saPtr; ! Ns_MutexLock(&lock); + hPtr = Tcl_FirstHashEntry(&preboundTcp, &search); while (hPtr != NULL) { ! saPtr = (struct sockaddr_in *) Tcl_GetHashKey(&preboundTcp, hPtr); ! addr = ns_inet_ntoa(saPtr->sin_addr); ! port = htons(saPtr->sin_port); ! sock = (int)Tcl_GetHashValue(hPtr); ! Ns_Log(Warning, "prebind: closed unused TCP: %s:%d = %d", addr, port, sock); ! close(sock); ! hPtr = Tcl_NextHashEntry(&search); } Tcl_DeleteHashTable(&preboundTcp); Tcl_InitHashTable(&preboundTcp, sizeof(struct sockaddr_in)/sizeof(int)); + hPtr = Tcl_FirstHashEntry(&preboundUdp, &search); while (hPtr != NULL) { ! saPtr = (struct sockaddr_in *) Tcl_GetHashKey(&preboundUdp, hPtr); ! addr = ns_inet_ntoa(saPtr->sin_addr); ! port = htons(saPtr->sin_port); ! sock = (int)Tcl_GetHashValue(hPtr); ! Ns_Log(Warning, "prebind: closed unused UDP: %s:%d = %d", addr, port, sock); ! close(sock); ! hPtr = Tcl_NextHashEntry(&search); } Tcl_DeleteHashTable(&preboundUdp); Tcl_InitHashTable(&preboundUdp, sizeof(struct sockaddr_in)/sizeof(int)); + hPtr = Tcl_FirstHashEntry(&preboundRaw, &search); while (hPtr != NULL) { ! sock = (int)Tcl_GetHashKey(&preboundRaw, hPtr); ! port = (int)Tcl_GetHashValue(hPtr); ! Ns_Log(Warning, "prebind: closed unused RAW: %d = %d", port, sock); ! close(sock); ! hPtr = Tcl_NextHashEntry(&search); } Tcl_DeleteHashTable(&preboundRaw); Tcl_InitHashTable(&preboundRaw, TCL_ONE_WORD_KEYS); + hPtr = Tcl_FirstHashEntry(&preboundUnix, &search); while (hPtr != NULL) { ! addr = (char *) Tcl_GetHashKey(&preboundUnix, hPtr); ! sock = (int)Tcl_GetHashValue(hPtr); ! Ns_Log(Warning, "prebind: closed unused Unix: %s = %d", addr, sock); ! close(sock); ! hPtr = Tcl_NextHashEntry(&search); } Tcl_DeleteHashTable(&preboundUnix); Tcl_InitHashTable(&preboundUnix, TCL_STRING_KEYS); + Ns_MutexUnlock(&lock); } *************** *** 416,430 **** * PreBind -- * ! * Pre-bind to one or more ports in a comma-separated list. ! * addr:port[/protocol] ! * port[/protocol] ! * 0/icmp[/count] ! * /path * Results: ! * None. * * Side effects: ! * Sockets are left in bound state for later listen ! * in Ns_SockListen. * *---------------------------------------------------------------------- --- 443,459 ---- * PreBind -- * ! * Pre-bind to one or more ports in a comma-separated list: ! * ! * addr:port[/protocol] ! * port[/protocol] ! * 0/icmp[/count] ! * /path ! * * Results: ! * None. * * Side effects: ! * Sockets are left in bound state for later listen ! * in Ns_SockListen. * *---------------------------------------------------------------------- *************** *** 439,539 **** char *next, *str, *addr, *proto; ! for(;line != NULL;line = next) { ! if((next = strchr(line, ','))) { ! *next++ = '\0'; ! } ! proto = "tcp"; ! addr = "0.0.0.0"; ! /* Parse port */ ! if((str = strchr(line, ':'))) { ! *str++ = '\0'; ! port = atoi(str); ! addr = line; ! line = str; ! } else { ! port = atoi(line); ! } ! /* Parse protocol */ ! if(*line != '/' && (str = strchr(line,'/'))) { ! *str++ = '\0'; ! proto = str; ! } ! ! if(!strcmp(proto,"tcp") && port > 0) { ! if(Ns_GetSockAddr(&sa, addr, port) != NS_OK) { ! Ns_Log(Error, "prebind: tcp: invalid address: %s:%d",addr,port); ! continue; ! } ! hPtr = Tcl_CreateHashEntry(&preboundTcp, (char *) &sa, &new); ! if(!new) { ! Ns_Log(Error, "prebind: tcp: duplicate entry: %s:%d",addr,port); ! continue; ! } ! if((sock = Ns_SockBind(&sa)) == -1) { ! Ns_Log(Error, "prebind: tcp: %s:%d: %s",addr,port,strerror(errno)); ! Tcl_DeleteHashEntry(hPtr); ! continue; ! } ! Tcl_SetHashValue(hPtr, sock); ! Ns_Log(Notice, "prebind: tcp: %s:%d = %d", addr, port, sock); ! } ! if(!strcmp(proto,"udp") && port > 0) { ! if(Ns_GetSockAddr(&sa, addr, port) != NS_OK) { ! Ns_Log(Error, "prebind: udp: invalid address: %s:%d",addr,port); ! continue; ! } ! hPtr = Tcl_CreateHashEntry(&preboundUdp, (char *) &sa, &new); ! if(!new) { ! Ns_Log(Error, "prebind: udp: duplicate entry: %s:%d",addr,port); ! continue; ! } ! if((sock = Ns_SockBindUdp(&sa)) == -1) { ! Ns_Log(Error, "prebind: udp: %s:%d: %s",addr,port,strerror(errno)); ! Tcl_DeleteHashEntry(hPtr); ! continue; ! } ! Tcl_SetHashValue(hPtr, sock); ! Ns_Log(Notice, "prebind: udp: %s:%d = %d", addr, port, sock); ! } ! if(!strncmp(proto,"icmp",4)) { ! int count = 1; ! /* Parse count */ ! if((str = strchr(str,'/'))) { ! *(str++) = '\0'; ! count = atoi(str); ! } ! while(count--) { ! if((sock = Ns_SockRaw(IPPROTO_ICMP)) == -1) { ! Ns_Log(Error, "prebind: icmp: %s",strerror(errno)); ! continue; ! } ! hPtr = Tcl_CreateHashEntry(&preboundRaw, (char *) sock, &new); ! if(!new) { ! Ns_Log(Error, "prebind: icmp: duplicate entry"); ! close(sock); ! continue; ! } ! Tcl_SetHashValue(hPtr, IPPROTO_ICMP); ! Ns_Log(Notice, "prebind: icmp: %d", sock); ! } ! } ! if(*line == '/') { ! hPtr = Tcl_CreateHashEntry(&preboundUnix, (char *) line, &new); ! if(!new) { ! Ns_Log(Error, "prebind: unix: duplicate entry: %s",line); ! continue; ! } ! if((sock = Ns_SockListenUnix(line)) == -1) { ! Ns_Log(Error, "prebind: unix: %s: %s",proto,strerror(errno)); ! Tcl_DeleteHashEntry(hPtr); ! continue; ! } ! Tcl_SetHashValue(hPtr, sock); ! Ns_Log(Notice, "prebind: unix: %s = %d", line, sock); ! } } } --- 468,582 ---- char *next, *str, *addr, *proto; ! for (;line != NULL; line = next) { ! next = strchr(line, ','); ! if (next) { ! *next++ = '\0'; ! } ! proto = "tcp"; ! addr = "0.0.0.0"; ! /* Parse port */ ! str = strchr(line, ':'); ! if (str) { ! *str++ = '\0'; ! port = atoi(str); ! addr = line; ! line = str; ! } else { ! port = atoi(line); ! } ! /* Parse protocol */ ! if (*line != '/' && (str = strchr(line,'/'))) { ! *str++ = '\0'; ! proto = str; ! } ! ! if (!strcmp(proto,"tcp") && port > 0) { ! if (Ns_GetSockAddr(&sa, addr, port) != NS_OK) { ! Ns_Log(Error, "prebind: tcp: invalid address: %s:%d", ! addr, port); ! continue; ! } ! hPtr = Tcl_CreateHashEntry(&preboundTcp, (char *) &sa, &new); ! if (!new) { ! Ns_Log(Error, "prebind: tcp: duplicate entry: %s:%d", ! addr, port); ! continue; ! } ! sock = Ns_SockBind(&sa); ! if (sock == -1) { ! Ns_Log(Error, "prebind: tcp: %s:%d: %s", addr, port, ! strerror(errno)); ! Tcl_DeleteHashEntry(hPtr); ! continue; ! } ! Tcl_SetHashValue(hPtr, sock); ! Ns_Log(Notice, "prebind: tcp: %s:%d = %d", addr, port, sock); ! } ! if (!strcmp(proto,"udp") && port > 0) { ! if (Ns_GetSockAddr(&sa, addr, port) != NS_OK) { ! Ns_Log(Error, "prebind: udp: invalid address: %s:%d", ! addr, port); ! continue; ! } ! hPtr = Tcl_CreateHashEntry(&preboundUdp, (char *) &sa, &new); ! if (!new) { ! Ns_Log(Error, "prebind: udp: duplicate entry: %s:%d", ! addr, port); ! continue; ! } ! sock = Ns_SockBindUdp(&sa); ! if (sock == -1) { ! Ns_Log(Error, "prebind: udp: %s:%d: %s", addr, port, ! strerror(errno)); ! Tcl_DeleteHashEntry(hPtr); ! continue; ! } ! Tcl_SetHashValue(hPtr, sock); ! Ns_Log(Notice, "prebind: udp: %s:%d = %d", addr, port, sock); ! } ! if (!strncmp(proto,"icmp",4)) { ! int count = 1; ! /* Parse count */ ! str = strchr(str,'/'); ! if (str) { ! *(str++) = '\0'; ! count = atoi(str); ! } ! while(count--) { ! sock = Ns_SockRaw(IPPROTO_ICMP); ! if (sock == -1) { ! Ns_Log(Error, "prebind: icmp: %s",strerror(errno)); ! continue; ! } ! hPtr = Tcl_CreateHashEntry(&preboundRaw, (char *) sock, &new); ! if(!new) { ! Ns_Log(Error, "prebind: icmp: duplicate entry"); ! close(sock); ! continue; ! } ! Tcl_SetHashValue(hPtr, IPPROTO_ICMP); ! Ns_Log(Notice, "prebind: icmp: %d", sock); ! } ! } ! if (*line == '/') { ! hPtr = Tcl_CreateHashEntry(&preboundUnix, (char *) line, &new); ! if (!new) { ! Ns_Log(Error, "prebind: unix: duplicate entry: %s",line); ! continue; ! } ! sock = Ns_SockListenUnix(line); ! if (sock == -1) { ! Ns_Log(Error, "prebind: unix: %s: %s", proto, strerror(errno)); ! Tcl_DeleteHashEntry(hPtr); ! continue; ! } ! Tcl_SetHashValue(hPtr, sock); ! Ns_Log(Notice, "prebind: unix: %s = %d", line, sock); ! } } } + #endif /* _WIN32 */ |
From: Zoran V. <vas...@us...> - 2005-06-10 07:45:08
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22153 Modified Files: ChangeLog Log Message: See file. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -d -r1.96 -r1.97 *** ChangeLog 10 Jun 2005 07:35:58 -0000 1.96 --- ChangeLog 10 Jun 2005 07:44:59 -0000 1.97 *************** *** 1,2 **** --- 1,11 ---- + 2005-06-10 Zoran Vasiljevic <vas...@us...> + + * nsd/nswin32.c: Cosmetic changes (reformatted, untabified). + Added NsRestoreSignals as no-op to make symetrical to Unix counterpart + and avoid excessive ifdefs for Windows. + Replaced GNU poll implementation. + + * nsd/unix.c: Cosmetic changes (reformatted, untabified). + 2005-06-10 Stephen Deasey <sd...@us...> |
From: Stephen D. <sd...@us...> - 2005-06-10 07:36:07
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17873 Modified Files: ChangeLog NEWS Log Message: Add latest news and remove news which belongs to other modules. Index: NEWS =================================================================== RCS file: /cvsroot/naviserver/naviserver/NEWS,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NEWS 8 Jun 2005 16:41:53 -0000 1.3 --- NEWS 10 Jun 2005 07:35:58 -0000 1.4 *************** *** 37,40 **** --- 37,41 ---- Code Changes: + * Use GCC compiler code checks #1215725 * Remove GNU implementations of getopt and poll * Cleanup up autoconf and use autoheader *************** *** 47,67 **** * Modules nspd and nsext moved from core to external modules * Objectified TclX keyed lists - - New Modules: - - * New nsudp module to support HTTP over UDP - * New nstk module that implements templating and Tcl utilities - * New nsaspell module implements interface to GNU Aspell - * New nsberkeleydb module implements interface to BerkelyDB - * New nschartdir module implements charting interface to ChartDirector - * New nsclamav module implements interface to ClamAV anti-virus - * New nsdns module implements DNS client and server - * New nsfortune module implements interface to Unix fortune game - * New nsfreetds module implements database driver to FreeTDS - * New nsgdchart module implements charting using GD library - * New nsimap module implements IMAP client using UW imap client - * New nsocaml module implements interface to OCaml langage - * New nssavi module implements interface to Sophos anti-virus - * New nssnmp module implements SNMP client and SNMP trap server - * New nszlib module implements interface to zlib library - --- 48,49 ---- Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -d -r1.95 -r1.96 *** ChangeLog 10 Jun 2005 07:29:19 -0000 1.95 --- ChangeLog 10 Jun 2005 07:35:58 -0000 1.96 *************** *** 1,4 **** --- 1,6 ---- 2005-06-10 Stephen Deasey <sd...@us...> + * NEWS: Add latest news and remove news which belongs to other modules. + * include/Makefile.global.in: Enable Tcl CONST checking. * include/nsthread.h: |
From: Zoran V. <vas...@us...> - 2005-06-10 07:30:09
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13693 Modified Files: nswin32.c Log Message: Added NsRestoreSignals as no-op to make symetrical to Unix counterpart and avoid excessive ifdefs for Windows. Replaced GNU pool implementation. Index: nswin32.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nswin32.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nswin32.c 10 Jun 2005 07:25:03 -0000 1.2 --- nswin32.c 10 Jun 2005 07:29:51 -0000 1.3 *************** *** 312,315 **** --- 312,337 ---- /* *---------------------------------------------------------------------- + * NsRestoreSignals -- + * + * Noop to avoid ifdefs and make symetrical to Unix part + * + * Results: + * None. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + void + NsRestoreSignals(void) + { + return; + } + + + /* + *---------------------------------------------------------------------- * * NsHandleSignals -- *************** *** 883,965 **** } } ! ! ! /* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. ! This file is part of the GNU C Library. ! ! The GNU C Library is free software; you can redistribute it and/or ! modify it under the terms of the GNU Library General Public License as ! published by the Free Software Foundation; either version 2 of the ! License, or (at your option) any later version. ! ! The GNU C Library is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! Library General Public License for more details. ! ! You should have received a copy of the GNU Library General Public ! License along with the GNU C Library; see the file COPYING.LIB. If not, ! write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ! Boston, MA 02111-1307, USA. */ ! ! /* Poll the file descriptors described by the NFDS structures starting at ! FDS. If TIMEOUT is nonzero and not -1, allow TIMEOUT milliseconds for ! an event to occur; if TIMEOUT is -1, block until an event occurs. ! Returns the number of file descriptors with events, zero if timed out, ! or -1 for errors. */ int ! poll (fds, nfds, timeout) ! struct pollfd *fds; ! unsigned long int nfds; ! int timeout; { ! struct timeval tv, *tvp; ! fd_set rset, wset, xset; ! struct pollfd *f; ! int ready; ! int maxfd = 0; ! ! FD_ZERO (&rset); ! FD_ZERO (&wset); ! FD_ZERO (&xset); ! ! for (f = fds; f < &fds[nfds]; ++f) ! if (f->fd != -1) ! { ! if (f->events & POLLIN) ! FD_SET (f->fd, &rset); ! if (f->events & POLLOUT) ! FD_SET (f->fd, &wset); ! if (f->events & POLLPRI) ! FD_SET (f->fd, &xset); ! if (f->fd > maxfd && (f->events & (POLLIN|POLLOUT|POLLPRI))) ! maxfd = f->fd; ! } ! ! if (timeout < 0) { ! tvp = NULL; ! } else { ! tv.tv_sec = timeout / 1000; ! tv.tv_usec = (timeout % 1000) * 1000; ! tvp = &tv; ! } ! ! ready = select (maxfd + 1, &rset, &wset, &xset, tvp); ! if (ready > 0) ! for (f = fds; f < &fds[nfds]; ++f) ! { ! f->revents = 0; ! if (f->fd >= 0) ! { ! if (FD_ISSET (f->fd, &rset)) ! f->revents |= POLLIN; ! if (FD_ISSET (f->fd, &wset)) ! f->revents |= POLLOUT; ! if (FD_ISSET (f->fd, &xset)) ! f->revents |= POLLPRI; } ! } ! ! return ready; } --- 905,979 ---- } } ! /* ! * ----------------------------------------------------------------- ! * Copyright 1994 University of Washington ! * ! * Permission is hereby granted to copy this software, and to ! * use and redistribute it, except that this notice may not be ! * removed. The University of Washington does not guarantee ! * that this software is suitable for any purpose and will not ! * be held liable for any damage it may cause. ! * ----------------------------------------------------------------- ! * ! * Modified to work properly on Darwin 10.2 or less. ! * Also, heavily reformatted to be more readable. ! */ int ! poll(struct pollfd *fds, unsigned long int nfds, int timo) { ! struct timeval timeout, *toptr; ! fd_set ifds, ofds, efds; ! int i, rc, n = -1; ! ! FD_ZERO(&ifds); ! FD_ZERO(&ofds); ! FD_ZERO(&efds); ! ! for (i = 0; i < nfds; ++i) { ! if (fds[i].fd == -1) { ! continue; ! } ! if (fds[i].fd > n) { ! n = fds[i].fd; ! } ! if ((fds[i].events & POLLIN)) { ! FD_SET(fds[i].fd, &ifds); ! } ! if ((fds[i].events & POLLOUT)) { ! FD_SET(fds[i].fd, &ofds); ! } ! if ((fds[i].events & POLLPRI)) { ! FD_SET(fds[i].fd, &efds); ! } } ! if (timo < 0) { ! toptr = NULL; ! } else { ! toptr = &timeout; ! timeout.tv_sec = timo / 1000; ! timeout.tv_usec = (timo - timeout.tv_sec * 1000) * 1000; ! } ! rc = select(++n, &ifds, &ofds, &efds, toptr); ! if (rc <= 0) { ! return rc; ! } ! for (i = 0; i < nfds; ++i) { ! fds[i].revents = 0; ! if (fds[i].fd == -1) { ! continue; ! } ! if (FD_ISSET(fds[i].fd, &ifds)) { ! fds[i].revents |= POLLIN; ! } ! if (FD_ISSET(fds[i].fd, &ofds)) { ! fds[i].revents |= POLLOUT; ! } ! if (FD_ISSET(fds[i].fd, &efds)) { ! fds[i].revents |= POLLPRI; ! } ! } ! ! return rc; } + |
From: Stephen D. <sd...@us...> - 2005-06-10 07:29:38
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14038 Modified Files: ChangeLog Log Message: * include/Makefile.global.in: Enable Tcl CONST checking. * include/nsthread.h: * include/nscheck.h: Add support for extra GCC checks. (RFE #1215725) Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** ChangeLog 10 Jun 2005 02:42:19 -0000 1.94 --- ChangeLog 10 Jun 2005 07:29:19 -0000 1.95 *************** *** 1,2 **** --- 1,8 ---- + 2005-06-10 Stephen Deasey <sd...@us...> + + * include/Makefile.global.in: Enable Tcl CONST checking. + * include/nsthread.h: + * include/nscheck.h: Add support for extra GCC checks. (RFE #1215725) + 2005-06-09 Stephen Deasey <sd...@us...> |
From: Stephen D. <sd...@us...> - 2005-06-10 07:29:30
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14038/include Modified Files: Makefile.global.in nsthread.h Added Files: nscheck.h Log Message: * include/Makefile.global.in: Enable Tcl CONST checking. * include/nsthread.h: * include/nscheck.h: Add support for extra GCC checks. (RFE #1215725) --- NEW FILE: nscheck.h --- /* * The contents of this file are subject to the AOLserver Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://aolserver.com/. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. * * The Original Code is AOLserver Code and related documentation * distributed by AOL. * * The Initial Developer of the Original Code is America Online, * Inc. Portions created by AOL are Copyright (C) 1999 America Online, * Inc. All Rights Reserved. * * Alternatively, the contents of this file may be used under the terms * of the GNU General Public License (the "GPL"), in which case the * provisions of GPL are applicable instead of those above. If you wish * to allow use of your version of this file only under the terms of the * GPL and not to allow others to use your version of this file under the * License, indicate your decision by deleting the provisions above and * replace them with the notice and other provisions required by the GPL. * If you do not delete the provisions above, a recipient may use your * version of this file under either the License or the GPL. */ /* * nscheck.h -- * * Stronger compile time error checking when using GCC. * * $Header: /cvsroot/naviserver/naviserver/include/nscheck.h,v 1.1 2005/06/10 07:29:19 sdeasey Exp $ */ #ifndef NSCHECK_H #define NSCHECK_H #undef __GNUC_PREREQ #if defined __GNUC__ && defined __GNUC_MINOR__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) #endif #if __GNUC_PREREQ(2,96) # define NS_GNUC_MALLOC __attribute__((__malloc__)) # define NS_GNUC_PURE __attribute__((__pure__)) # define NS_GNUC_CONST __attribute__((__const__)) #else # define NS_GNUC_MALLOC # define NS_GNUC_PURE # define NS_GNUC_CONST #endif #if __GNUC_PREREQ(2,7) # define NS_GNUC_UNUSED __attribute__((__unused__)) # define NS_GNUC_NORETURN __attribute__((__noreturn__)) # define NS_GNUC_PRINTF(fmtarg, firstvararg) \ __attribute__((__format__ (__printf__, fmtarg, firstvararg))) # define NS_GNUC_SCANF(fmtarg, firstvararg) \ __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) #else # define NS_GNUC_UNUSED # define NS_GNUC_NORETURN # define NS_GNUC_PRINTF(fmtarg, firstvararg) # define NS_GNUC_SCANF(fmtarg, firstvararg) #endif #if __GNUC_PREREQ(2,8) # define NS_GNUC_FORMAT(fmtarg) __attribute__((__format_arg__ (fmtarg))) #else # define NS_GNUC_FORMAT(fmtarg) #endif #if __GNUC_PREREQ(3,1) # define NS_GNUC_USED __attribute__((__used__)) #else # define NS_GNUC_USED #endif #if __GNUC_PREREQ(3,2) # define NS_GNUC_DEPRECATED __attribute__((__deprecated__)) #else # define NS_GNUC_DEPRECATED #endif #if __GNUC_PREREQ(3,3) # define NS_GNUC_NONNULL(...) __attribute__((__nonnull__(__VA_ARGS__))) # define NS_GNUC_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) # define NS_GNUC_MAYALIAS __attribute__((__may_alias__)) #else # define NS_GNUC_NONNULL(...) # define NS_GNUC_WARN_UNUSED_RESULT # define NS_GNUC_MAYALIAS #endif /* * Ensure static RCSID strings aren't optimised away. */ #define NS_RCSID(string) static const char *RCSID NS_GNUC_USED = string \ ", compiled: " __DATE__ " " __TIME__ #endif /* NSCHECK_H */ Index: Makefile.global.in =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/Makefile.global.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Makefile.global.in 10 Jun 2005 02:42:19 -0000 1.10 --- Makefile.global.in 10 Jun 2005 07:29:19 -0000 1.11 *************** *** 71,75 **** CFLAGS_INCLUDE = -I$(INCDIR) @TCL_INCLUDES@ CFLAGS_EXTRA = @SHLIB_CFLAGS@ @TCL_EXTRA_CFLAGS@ ! DEFS = -DNO_CONST @DEFS@ CFLAGS += @CFLAGS_DEFAULT@ $(CFLAGS_WARNING) $(CFLAGS_EXTRA) $(CFLAGS_INCLUDE) @CPPFLAGS@ $(DEFS) --- 71,75 ---- CFLAGS_INCLUDE = -I$(INCDIR) @TCL_INCLUDES@ CFLAGS_EXTRA = @SHLIB_CFLAGS@ @TCL_EXTRA_CFLAGS@ ! DEFS = @DEFS@ CFLAGS += @CFLAGS_DEFAULT@ $(CFLAGS_WARNING) $(CFLAGS_EXTRA) $(CFLAGS_INCLUDE) @CPPFLAGS@ $(DEFS) Index: nsthread.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/nsthread.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** nsthread.h 4 Jun 2005 11:42:12 -0000 1.3 --- nsthread.h 10 Jun 2005 07:29:19 -0000 1.4 *************** *** 40,43 **** --- 40,44 ---- #include <config.h> + #include <nscheck.h> #ifdef _WIN32 |
From: Zoran V. <vas...@us...> - 2005-06-10 07:25:11
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11206 Modified Files: nswin32.c Log Message: Cosmetic changes (reformated function comments, untabified). Index: nswin32.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/nswin32.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** nswin32.c 16 Feb 2005 08:39:37 -0000 1.1.1.1 --- nswin32.c 10 Jun 2005 07:25:03 -0000 1.2 *************** *** 32,36 **** * win32.c -- * ! * Win32 specific routines. */ --- 32,36 ---- * win32.c -- * ! * Win32 specific routines. */ [...1117 lines suppressed...] ! Ns_Fatal("nswin32: SetServiceStatus(%d) failed: '%s'", state, SysErrMsg()); } } --- 879,884 ---- } if (hStatus != 0 && SetServiceStatus(hStatus, &curStatus) != TRUE) { ! Ns_Fatal("nswin32: SetServiceStatus(%d) failed: '%s'", state, ! SysErrMsg()); } } *************** *** 947,949 **** return ready; ! } \ No newline at end of file --- 963,965 ---- return ready; ! } |
From: Zoran V. <vas...@us...> - 2005-06-10 07:03:36
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32049 Modified Files: unix.c Log Message: Cosmetic cleanup (reformat some function comments, untabified) Index: unix.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/unix.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** unix.c 15 May 2005 07:47:21 -0000 1.6 --- unix.c 10 Jun 2005 07:03:27 -0000 1.7 *************** *** 63,73 **** * NsBlockSignals -- * ! * Block signals at startup. * * Results: ! * None. * * Side effects: ! * Signals will be pending until NsHandleSignals. * *---------------------------------------------------------------------- --- 63,73 ---- * NsBlockSignals -- * ! * Block signals at startup. * * Results: ! * None. * * Side effects: ! * Signals will be pending until NsHandleSignals. * *---------------------------------------------------------------------- *************** *** 117,121 **** * NsRestoreSignals -- * ! * Restore all signals to their default value. * * Results: --- 117,121 ---- * NsRestoreSignals -- * ! * Restore all signals to their default value. * * Results: *************** *** 123,127 **** * * Side effects: ! * A new thread will be created. * *---------------------------------------------------------------------- --- 123,127 ---- * * Side effects: ! * None. * *---------------------------------------------------------------------- *************** *** 147,158 **** * NsHandleSignals -- * ! * Loop forever processing signals until a term signal * is received. * * Results: ! * None. * * Side effects: ! * HUP callbacks may be called. * *---------------------------------------------------------------------- --- 147,158 ---- * NsHandleSignals -- * ! * Loop forever processing signals until a term signal * is received. * * Results: ! * None. * * Side effects: ! * HUP callbacks may be called. * *---------------------------------------------------------------------- *************** *** 176,188 **** } do { ! do { ! err = ns_sigwait(&set, &sig); ! } while (err == EINTR); ! if (err != 0) { ! Ns_Fatal("signal: ns_sigwait failed: %s", strerror(errno)); ! } ! if (sig == SIGHUP) { ! NsRunSignalProcs(); ! } } while (sig == SIGHUP); --- 176,188 ---- } do { ! do { ! err = ns_sigwait(&set, &sig); ! } while (err == EINTR); ! if (err != 0) { ! Ns_Fatal("signal: ns_sigwait failed: %s", strerror(errno)); ! } ! if (sig == SIGHUP) { ! NsRunSignalProcs(); ! } } while (sig == SIGHUP); *************** *** 202,212 **** * NsSendSignal -- * ! * Send a signal to the main thread. * * Results: ! * None. * * Side effects: ! * Main thread in NsHandleSignals will wakeup. * *---------------------------------------------------------------------- --- 202,212 ---- * NsSendSignal -- * ! * Send a signal to the main thread. * * Results: ! * None. * * Side effects: ! * Main thread in NsHandleSignals will wakeup. * *---------------------------------------------------------------------- *************** *** 293,296 **** --- 293,297 ---- } Ns_MutexUnlock(&lock); + return (pw != NULL) ? NS_TRUE : NS_FALSE; } *************** *** 336,343 **** * Results: * Return NS_TRUE if user name is found in /etc/passwd file and ! * NS_FALSE otherwise. * * Side effects: ! * None. * *---------------------------------------------------------------------- --- 337,344 ---- * Results: * Return NS_TRUE if user name is found in /etc/passwd file and ! * NS_FALSE otherwise. * * Side effects: ! * None. * *---------------------------------------------------------------------- *************** *** 367,371 **** * * Results: ! * Group id or -1 if not found. * * Side effects: --- 368,372 ---- * * Results: ! * Group id or -1 if not found. * * Side effects: *************** *** 389,392 **** --- 390,394 ---- } Ns_MutexUnlock(&lock); + return retcode; } *************** *** 426,429 **** --- 428,432 ---- } + /* *---------------------------------------------------------------------- *************** *** 433,437 **** * * Results: ! * Group id or -1 if not found. * * Side effects: --- 436,440 ---- * * Results: ! * Group id or -1 if not found. * * Side effects: *************** *** 481,487 **** --- 484,492 ---- fd_set ifds, ofds, efds; int i, rc, n = -1; + FD_ZERO(&ifds); FD_ZERO(&ofds); FD_ZERO(&efds); + for (i = 0; i < nfds; ++i) { if (fds[i].fd == -1) { *************** *** 559,563 **** * As of glibc 2.3 with NPTL, this should be a no-op. */ - pthread_kill_other_threads_np(); #endif --- 564,567 ---- |
From: Zoran V. <vas...@us...> - 2005-06-10 06:47:33
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25199 Modified Files: tclxkeylist.c Log Message: Silence some compiler warnings Index: tclxkeylist.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclxkeylist.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tclxkeylist.c 15 May 2005 07:47:21 -0000 1.3 --- tclxkeylist.c 10 Jun 2005 06:47:25 -0000 1.4 *************** *** 283,287 **** } for (ii = 0; ii < keyCount; ii++) { ! keyPtr = Tcl_GetStringFromObj(objValues[ii], &keySize); totalKeySize += keySize + 1; } --- 283,287 ---- } for (ii = 0; ii < keyCount; ii++) { ! keyPtr = Tcl_GetStringFromObj(objValues[ii], (int*)&keySize); totalKeySize += keySize + 1; } *************** *** 291,295 **** for (ii = 0; ii < keyCount; ii++) { keyArgv[ii] = nextByte; ! keyPtr = Tcl_GetStringFromObj(objValues[ii], &keySize); strncpy(nextByte, keyPtr, keySize); nextByte[keySize] = 0; --- 291,295 ---- for (ii = 0; ii < keyCount; ii++) { keyArgv[ii] = nextByte; ! keyPtr = Tcl_GetStringFromObj(objValues[ii], (int*)&keySize); strncpy(nextByte, keyPtr, keySize); nextByte[keySize] = 0; *************** *** 351,355 **** if (fieldValuePtr) { size_t valueLen; ! char *keyValue = Tcl_GetStringFromObj(objValPtr, &valueLen); char *newValue = strncpy(ckalloc(valueLen + 1), keyValue, valueLen); newValue[valueLen] = 0; --- 351,355 ---- if (fieldValuePtr) { size_t valueLen; ! char *keyValue = Tcl_GetStringFromObj(objValPtr, (int*)&valueLen); char *newValue = strncpy(ckalloc(valueLen + 1), keyValue, valueLen); newValue[valueLen] = 0; *************** *** 405,409 **** } ! listStr = Tcl_GetStringFromObj(Tcl_GetObjResult(interp), &listLen); newList = strncpy(ckalloc(listLen + 1), listStr, listLen); listStr[listLen] = 0; --- 405,409 ---- } ! listStr = Tcl_GetStringFromObj(Tcl_GetObjResult(interp), (int*)&listLen); newList = strncpy(ckalloc(listLen + 1), listStr, listLen); listStr[listLen] = 0; *************** *** 451,455 **** } ! listStr = Tcl_GetStringFromObj(Tcl_GetObjResult(interp), &listLen); newList = strncpy(ckalloc(listLen + 1), listStr, listLen); listStr[listLen] = 0; --- 451,455 ---- } ! listStr = Tcl_GetStringFromObj(Tcl_GetObjResult(interp), (int*)&listLen); newList = strncpy(ckalloc(listLen + 1), listStr, listLen); listStr[listLen] = 0; |
From: Stephen D. <sd...@us...> - 2005-06-10 02:42:28
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10550 Modified Files: ChangeLog configure configure.in Log Message: * include/Makefile.global.in: Remove TCL_DEFS which isn't needed now that autoheader is used. * configure.in: Add call to TEA_TIME_HANDLER for time defs. * configure: * include/config.h.in: Rebuild configure and config.h. Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** ChangeLog 9 Jun 2005 21:10:07 -0000 1.93 --- ChangeLog 10 Jun 2005 02:42:19 -0000 1.94 *************** *** 1,2 **** --- 1,10 ---- + 2005-06-09 Stephen Deasey <sd...@us...> + + * include/Makefile.global.in: Remove TCL_DEFS which isn't needed + now that autoheader is used. + * configure.in: Add call to TEA_TIME_HANDLER for time defs. + * configure: + * include/config.h.in: Rebuild configure and config.h. + 2005-06-09 Vlad Seryakov <ser...@us...> Index: configure =================================================================== RCS file: /cvsroot/naviserver/naviserver/configure,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** configure 4 Jun 2005 15:24:28 -0000 1.7 --- configure 10 Jun 2005 02:42:19 -0000 1.8 *************** *** 1,4 **** #! /bin/sh ! # From configure.in Revision: 1.5 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for NaviServer 4.99.0. --- 1,4 ---- #! /bin/sh ! # From configure.in Revision: 1.6 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for NaviServer 4.99.0. *************** *** 10634,10637 **** --- 10634,11470 ---- fi + echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 + echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 + if test "${ac_cv_struct_tm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <sys/types.h> + #include <time.h> + + int + main () + { + struct tm *tp; tp->tm_sec; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_struct_tm=time.h + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_struct_tm=sys/time.h + fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 + echo "${ECHO_T}$ac_cv_struct_tm" >&6 + if test $ac_cv_struct_tm = sys/time.h; then + + cat >>confdefs.h <<\_ACEOF + #define TM_IN_SYS_TIME 1 + _ACEOF + + fi + + + + for ac_header in sys/time.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 + if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + fi + echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 + echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + else + # Is the header compilable? + echo "$as_me:$LINENO: checking $ac_header usability" >&5 + echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + $ac_includes_default + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no + fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 + echo "${ECHO_T}$ac_header_compiler" >&6 + + # Is the header present? + echo "$as_me:$LINENO: checking $ac_header presence" >&5 + echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <$ac_header> + _ACEOF + if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi + else + ac_cpp_err=yes + fi + if test -z "$ac_cpp_err"; then + ac_header_preproc=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no + fi + rm -f conftest.err conftest.$ac_ext + echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 + echo "${ECHO_T}$ac_header_preproc" >&6 + + # So? What about this header? + case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 + echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 + echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 + echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 + echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 + echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 + echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 + echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX + ## ----------------------------------------------------- ## + ## Report this to nav...@li... ## + ## ----------------------------------------------------- ## + _ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + esac + echo "$as_me:$LINENO: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 + if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + eval "$as_ac_Header=\$ac_header_preproc" + fi + echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 + echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + + fi + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF + + fi + + done + + echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 + echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 + if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <sys/types.h> + #include <sys/time.h> + #include <time.h> + + int + main () + { + if ((struct tm *) 0) + return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_time=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_header_time=no + fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 + echo "${ECHO_T}$ac_cv_header_time" >&6 + if test $ac_cv_header_time = yes; then + + cat >>confdefs.h <<\_ACEOF + #define TIME_WITH_SYS_TIME 1 + _ACEOF + + fi + + echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 + echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 + if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <sys/types.h> + #include <$ac_cv_struct_tm> + + + int + main () + { + static struct tm ac_aggr; + if (ac_aggr.tm_zone) + return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_tm_tm_zone=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <sys/types.h> + #include <$ac_cv_struct_tm> + + + int + main () + { + static struct tm ac_aggr; + if (sizeof ac_aggr.tm_zone) + return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_member_struct_tm_tm_zone=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_member_struct_tm_tm_zone=no + fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 + echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 + if test $ac_cv_member_struct_tm_tm_zone = yes; then + + cat >>confdefs.h <<_ACEOF + #define HAVE_STRUCT_TM_TM_ZONE 1 + _ACEOF + + + fi + + if test "$ac_cv_member_struct_tm_tm_zone" = yes; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_TM_ZONE 1 + _ACEOF + + else + echo "$as_me:$LINENO: checking for tzname" >&5 + echo $ECHO_N "checking for tzname... $ECHO_C" >&6 + if test "${ac_cv_var_tzname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <time.h> + #ifndef tzname /* For SGI. */ + extern char *tzname[]; /* RS6000 and others reject char **tzname. */ + #endif + + int + main () + { + atoi(*tzname); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_var_tzname=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_var_tzname=no + fi + rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 + echo "${ECHO_T}$ac_cv_var_tzname" >&6 + if test $ac_cv_var_tzname = yes; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_TZNAME 1 + _ACEOF + + fi + fi + + + + + for ac_func in gmtime_r localtime_r + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + echo "$as_me:$LINENO: checking for $ac_func" >&5 + echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 + if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ + #define $ac_func innocuous_$ac_func + + /* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + + #ifdef __STDC__ + # include <limits.h> + #else + # include <assert.h> + #endif + + #undef $ac_func + + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + { + #endif + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + char $ac_func (); + /* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ + #if defined (__stub_$ac_func) || defined (__stub___$ac_func) + choke me + #else + char (*f) () = $ac_func; + #endif + #ifdef __cplusplus + } + #endif + + int + main () + { + return f != $ac_func; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext conftest$ac_exeext + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" + fi + rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi + echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 + echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 + if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF + #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF + + fi + done + + + echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5 + echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6 + if test "${tcl_cv_member_tm_tzadj+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <time.h> + int + main () + { + struct tm tm; tm.tm_tzadj; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_member_tm_tzadj=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + tcl_cv_member_tm_tzadj=no + fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5 + echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6 + if test $tcl_cv_member_tm_tzadj = yes ; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_TM_TZADJ 1 + _ACEOF + + fi + + echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5 + echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6 + if test "${tcl_cv_member_tm_gmtoff+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <time.h> + int + main () + { + struct tm tm; tm.tm_gmtoff; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_member_tm_gmtoff=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + tcl_cv_member_tm_gmtoff=no + fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5 + echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6 + if test $tcl_cv_member_tm_gmtoff = yes ; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_TM_GMTOFF 1 + _ACEOF + + fi + + # + # Its important to include time.h in this check, as some systems + # (like convex) have timezone functions, etc. + # + echo "$as_me:$LINENO: checking long timezone variable" >&5 + echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6 + if test "${tcl_cv_var_timezone+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <time.h> + int + main () + { + extern long timezone; + timezone += 1; + exit (0); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_timezone_long=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + tcl_cv_timezone_long=no + fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5 + echo "${ECHO_T}$tcl_cv_timezone_long" >&6 + if test $tcl_cv_timezone_long = yes ; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_TIMEZONE_VAR 1 + _ACEOF + + else + # + # On some systems (eg IRIX 6.2), timezone is a time_t and not a long. + # + echo "$as_me:$LINENO: checking time_t timezone variable" >&5 + echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6 + if test "${tcl_cv_timezone_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + #include <time.h> + int + main () + { + extern time_t timezone; + timezone += 1; + exit (0); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + tcl_cv_timezone_time=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + tcl_cv_timezone_time=no + fi + rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5 + echo "${ECHO_T}$tcl_cv_timezone_time" >&6 + if test $tcl_cv_timezone_time = yes ; then + + cat >>confdefs.h <<\_ACEOF + #define HAVE_TIMEZONE_VAR 1 + _ACEOF + + fi + fi + # Index: configure.in =================================================================== RCS file: /cvsroot/naviserver/naviserver/configure.in,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** configure.in 4 Jun 2005 15:24:28 -0000 1.6 --- configure.in 10 Jun 2005 02:42:19 -0000 1.7 *************** *** 71,74 **** --- 71,75 ---- TEA_CONFIG_CFLAGS TEA_ENABLE_SYMBOLS + TEA_TIME_HANDLER # |
From: Stephen D. <sd...@us...> - 2005-06-10 02:42:28
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10550/include Modified Files: Makefile.global.in config.h.in Log Message: * include/Makefile.global.in: Remove TCL_DEFS which isn't needed now that autoheader is used. * configure.in: Add call to TEA_TIME_HANDLER for time defs. * configure: * include/config.h.in: Rebuild configure and config.h. Index: Makefile.global.in =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/Makefile.global.in,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile.global.in 9 Jun 2005 21:07:37 -0000 1.9 --- Makefile.global.in 10 Jun 2005 02:42:19 -0000 1.10 *************** *** 72,76 **** CFLAGS_EXTRA = @SHLIB_CFLAGS@ @TCL_EXTRA_CFLAGS@ DEFS = -DNO_CONST @DEFS@ ! CFLAGS += @CFLAGS_DEFAULT@ @TCL_DEFS@ $(CFLAGS_WARNING) $(CFLAGS_EXTRA) $(CFLAGS_INCLUDE) @CPPFLAGS@ $(DEFS) ifndef NSBUILD --- 72,76 ---- CFLAGS_EXTRA = @SHLIB_CFLAGS@ @TCL_EXTRA_CFLAGS@ DEFS = -DNO_CONST @DEFS@ ! CFLAGS += @CFLAGS_DEFAULT@ $(CFLAGS_WARNING) $(CFLAGS_EXTRA) $(CFLAGS_INCLUDE) @CPPFLAGS@ $(DEFS) ifndef NSBUILD Index: config.h.in =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/config.h.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config.h.in 4 Jun 2005 13:33:15 -0000 1.2 --- config.h.in 10 Jun 2005 02:42:19 -0000 1.3 *************** *** 31,34 **** --- 31,37 ---- #undef HAVE_GETNAMEINFO + /* Define to 1 if you have the `gmtime_r' function. */ + #undef HAVE_GMTIME_R + /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H *************** *** 43,46 **** --- 46,52 ---- #undef HAVE_LIMITS_H + /* Define to 1 if you have the `localtime_r' function. */ + #undef HAVE_LOCALTIME_R + /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H *************** *** 79,82 **** --- 85,91 ---- #undef HAVE_STRUCT_STAT64 + /* Define to 1 if `tm_zone' is member of `struct tm'. */ + #undef HAVE_STRUCT_TM_TM_ZONE + /* Define to 1 if you have the <sys/param.h> header file. */ #undef HAVE_SYS_PARAM_H *************** *** 85,88 **** --- 94,100 ---- #undef HAVE_SYS_STAT_H + /* Define to 1 if you have the <sys/time.h> header file. */ + #undef HAVE_SYS_TIME_H + /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H *************** *** 91,97 **** --- 103,126 ---- #undef HAVE_TIMEGM + /* Should we use the global timezone variable? */ + #undef HAVE_TIMEZONE_VAR + + /* Should we use the tm_gmtoff field of struct tm? */ + #undef HAVE_TM_GMTOFF + + /* Should we use the tm_tzadj field of struct tm? */ + #undef HAVE_TM_TZADJ + + /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use + `HAVE_STRUCT_TM_TM_ZONE' instead. */ + #undef HAVE_TM_ZONE + /* Is off64_t in <sys/types.h>? */ #undef HAVE_TYPE_OFF64_T + /* Define to 1 if you don't have `tm_zone' but do have the external array + `tzname'. */ + #undef HAVE_TZNAME + /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H *************** *** 181,184 **** --- 210,219 ---- #undef TCL_WIDE_INT_TYPE + /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ + #undef TIME_WITH_SYS_TIME + + /* Define to 1 if your <sys/time.h> declares `struct tm'. */ + #undef TM_IN_SYS_TIME + /* UNDER_CE version */ #undef UNDER_CE |
From: Vlad S. <ser...@us...> - 2005-06-09 21:31:40
|
Update of /cvsroot/naviserver/modules/nsudp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2559/nsudp Modified Files: nsudp.c Log Message: rewrote nssnmp's ns_udp using new Objv interface, added to nsudp's ns_udp -retries parameter. Index: nsudp.c =================================================================== RCS file: /cvsroot/naviserver/modules/nsudp/nsudp.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** nsudp.c 20 May 2005 20:34:32 -0000 1.1.1.1 --- nsudp.c 9 Jun 2005 21:31:30 -0000 1.2 *************** *** 169,177 **** int salen = sizeof(sa); char *address = 0, *data = 0; ! int sock, len, port, timeout = 5, noreply = 0; Ns_ObjvSpec opts[] = { {"-timeout", Ns_ObjvInt, &timeout, NULL}, {"-noreply", Ns_ObjvInt, &noreply, NULL}, {"--", Ns_ObjvBreak, NULL, NULL}, {NULL, NULL, NULL, NULL} --- 169,178 ---- int salen = sizeof(sa); char *address = 0, *data = 0; ! int sock, len, port, timeout = 5, retries = 1, noreply = 0; Ns_ObjvSpec opts[] = { {"-timeout", Ns_ObjvInt, &timeout, NULL}, {"-noreply", Ns_ObjvInt, &noreply, NULL}, + {"-retries", Ns_ObjvInt, &retries, NULL}, {"--", Ns_ObjvBreak, NULL, NULL}, {NULL, NULL, NULL, NULL} *************** *** 197,200 **** --- 198,202 ---- return TCL_ERROR; } + resend: if (sendto(sock, data, len, 0,(struct sockaddr*)&sa,sizeof(sa)) < 0) { Tcl_AppendResult(interp, "sendto error ", strerror(errno), 0); *************** *** 207,211 **** memset(buf,0,sizeof(buf)); Ns_SockSetNonBlocking(sock); ! again: FD_ZERO(&fds); FD_SET(sock,&fds); --- 209,213 ---- memset(buf,0,sizeof(buf)); Ns_SockSetNonBlocking(sock); ! wait: FD_ZERO(&fds); FD_SET(sock,&fds); *************** *** 216,220 **** case -1: if (errno == EINTR || errno == EINPROGRESS || errno == EAGAIN) { ! goto again; } Tcl_AppendResult(interp, "select error ", strerror(errno), 0); --- 218,222 ---- case -1: if (errno == EINTR || errno == EINPROGRESS || errno == EAGAIN) { ! goto wait; } Tcl_AppendResult(interp, "select error ", strerror(errno), 0); *************** *** 223,226 **** --- 225,231 ---- case 0: + if(--retries < 0) { + goto resend; + } Tcl_AppendResult(interp, "timeout", 0); close(sock); |
From: Vlad S. <ser...@us...> - 2005-06-09 21:31:40
|
Update of /cvsroot/naviserver/modules/nssnmp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2559/nssnmp Modified Files: ChangeLog README nssnmp.c Log Message: rewrote nssnmp's ns_udp using new Objv interface, added to nsudp's ns_udp -retries parameter. Index: nssnmp.c =================================================================== RCS file: /cvsroot/naviserver/modules/nssnmp/nssnmp.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nssnmp.c 8 Jun 2005 20:03:50 -0000 1.2 --- nssnmp.c 9 Jun 2005 21:31:30 -0000 1.3 *************** *** 2008,2011 **** --- 2008,2015 ---- * * $Log$ + * Revision 1.3 2005/06/09 21:31:30 seryakov + * rewrote nssnmp's ns_udp using new Objv interface, added to nsudp's ns_udp -retries + * parameter. + * * Revision 1.2 2005/06/08 20:03:50 seryakov * Changed license and wording in README files. *************** *** 3249,3310 **** *---------------------------------------------------------------------- */ ! static int UdpCmd(ClientData arg, Tcl_Interp *interp,int objc,Tcl_Obj *CONST objv[]) { ! fd_set rfds; ! int retries = 0; ! int timeout = 2; ! struct timeval tm; ! int fd,len,port; struct sockaddr_in sa; ! socklen_t salen = sizeof(sa); ! char *ptr,buf[16384] = ""; ! if(objc < 4) { ! Tcl_AppendResult(interp, "wrong # args: should be ns_udp host port data ?-retries retries? ?-timeout timeout?",NULL); ! return TCL_ERROR; ! } ! if(!(port = atoi(Tcl_GetString(objv[2]))) || ! Ns_GetSockAddr((sockaddr_in*)&sa,Tcl_GetString(objv[1]),port) != NS_OK) { ! Tcl_AppendResult(interp,"noHost: unknown host:port",0); return TCL_ERROR; } ! for(int i = 4;i < objc - 1;i += 2) { ! if(!strcasecmp(Tcl_GetString(objv[i]),"-retries")) retries = atoi(Tcl_GetString(objv[i+1])); else ! if(!strcasecmp(Tcl_GetString(objv[i]),"-timeout")) timeout = atoi(Tcl_GetString(objv[i+1])); } ! if((fd = socket(AF_INET,SOCK_DGRAM,0)) < 0) { ! Tcl_AppendResult(interp,"noResponse: ",strerror(errno),0); ! return -1; } ! ptr = Tcl_GetStringFromObj(objv[3],&len); ! again: ! if(sendto(fd,ptr,len,0,(struct sockaddr *)&sa,sizeof(struct sockaddr_in)) <= 0) { ! Tcl_AppendResult(interp,"noResponse: ",strerror(errno),0); ! close(fd); ! return TCL_ERROR; } ! tm.tv_usec = 0L; ! tm.tv_sec = timeout; ! FD_ZERO(&rfds); ! FD_SET(fd,&rfds); ! if(select(fd + 1,&rfds,0,0,&tm) < 0) { ! if(errno == EINTR) goto again; ! Tcl_AppendResult(interp,"noResponse: ",strerror(errno),0); ! close(fd); ! return TCL_ERROR; } ! if(!FD_ISSET(fd,&rfds)) { ! if(--retries > 0) goto again; ! Tcl_AppendResult(interp,"noResponse: timeout",0); ! close(fd); ! return TCL_ERROR; } ! if((len = recvfrom(fd,buf,sizeof(buf)-1,0,(struct sockaddr*)&sa,(socklen_t*)&salen)) <= 0) { ! Tcl_AppendResult(interp,"noResponse: ",strerror(errno),0); ! close(fd); ! return TCL_ERROR; } ! close(fd); ! Tcl_SetObjResult(interp,Tcl_NewStringObj(buf,len)); return TCL_OK; } --- 3253,3333 ---- *---------------------------------------------------------------------- */ ! static int ! UdpCmd(ClientData arg, Tcl_Interp *interp,int objc,Tcl_Obj *CONST objv[]) { ! fd_set fds; ! char buf[16384]; ! struct timeval tv; struct sockaddr_in sa; ! int salen = sizeof(sa); ! char *address = 0, *data = 0; ! int sock, len, port, timeout = 5, retries = 1, noreply = 0; ! ! Ns_ObjvSpec opts[] = { ! {"-timeout", Ns_ObjvInt, &timeout, NULL}, ! {"-retries", Ns_ObjvInt, &retries, NULL}, ! {"-noreply", Ns_ObjvInt, &noreply, NULL}, ! {"--", Ns_ObjvBreak, NULL, NULL}, ! {NULL, NULL, NULL, NULL} ! }; ! Ns_ObjvSpec args[] = { ! {"address", Ns_ObjvString, &address, NULL}, ! {"port", Ns_ObjvInt, &port, NULL}, ! {"data", Ns_ObjvString, &data, &len}, ! {NULL, NULL, NULL, NULL} ! }; ! if (Ns_ParseObjv(opts, args, interp, 1, objc, objv) != NS_OK) { return TCL_ERROR; } ! if (Ns_GetSockAddr(&sa, address, port) != NS_OK) { ! sprintf(buf, "%s:%d", address, port); ! Tcl_AppendResult(interp, "invalid address ", address, 0); ! return TCL_ERROR; } ! sock = socket(AF_INET, SOCK_DGRAM, 0); ! if (sock < 0) { ! Tcl_AppendResult(interp, "socket error ", strerror(errno), 0); ! return TCL_ERROR; } ! resend: ! if (sendto(sock, data, len, 0,(struct sockaddr*)&sa,sizeof(sa)) < 0) { ! Tcl_AppendResult(interp, "sendto error ", strerror(errno), 0); ! return TCL_ERROR; } ! if (noreply) { ! close(sock); ! return TCL_OK; } ! memset(buf,0,sizeof(buf)); ! Ns_SockSetNonBlocking(sock); ! again: ! FD_ZERO(&fds); ! FD_SET(sock,&fds); ! tv.tv_sec = timeout; ! tv.tv_usec = 0; ! len = select(sock+1, &fds, 0, 0, &tv); ! switch (len) { ! case -1: ! if (errno == EINTR || errno == EINPROGRESS || errno == EAGAIN) { ! goto again; ! } ! Tcl_AppendResult(interp, "select error ", strerror(errno), 0); ! close(sock); ! return TCL_ERROR; ! ! case 0: ! if(--retries > 0) goto resend; ! Tcl_AppendResult(interp, "timeout", 0); ! close(sock); ! return TCL_ERROR; } ! if (FD_ISSET(sock, &fds)) { ! len = recvfrom(sock, buf, sizeof(buf)-1, 0, (struct sockaddr*)&sa, (socklen_t*)&salen); ! if (len > 0) { ! Tcl_AppendResult(interp, buf, 0); ! } } ! close(sock); return TCL_OK; } Index: README =================================================================== RCS file: /cvsroot/naviserver/modules/nssnmp/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 8 Jun 2005 20:03:49 -0000 1.2 --- README 9 Jun 2005 21:31:30 -0000 1.3 *************** *** 164,167 **** --- 164,174 ---- ns_radius localhost 1645 secret User-Name test User-Password test2 + + ns_udp ?-timeout N? ?-noreply? ipaddr port data + sends udp data + + Example: + ns_udp 127.0.0.1 80 "GET / HTTP/1.0\n\n" + Nsmibdump Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/modules/nssnmp/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ChangeLog 20 May 2005 20:47:20 -0000 1.1.1.1 --- ChangeLog 9 Jun 2005 21:31:30 -0000 1.2 *************** *** 1,2 **** --- 1,6 ---- + 2005-06-09 Vlad Seryakov vl...@cr... + + * Rewrite ns_udp using new Objv interface + 2004-10-15 Vlad Seryakov vl...@cr... |
From: Vlad S. <ser...@us...> - 2005-06-09 21:10:19
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24358 Modified Files: ChangeLog Log Message: added missing TCL_DEFS in Makefile.global.in Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** ChangeLog 9 Jun 2005 00:01:22 -0000 1.92 --- ChangeLog 9 Jun 2005 21:10:07 -0000 1.93 *************** *** 1,2 **** --- 1,7 ---- + 2005-06-09 Vlad Seryakov <ser...@us...> + + * include/Makefile.global.in: added missing TCL_DEFS + in CFLAGS + 2005-06-08 Vlad Seryakov <ser...@us...> |
From: Vlad S. <ser...@us...> - 2005-06-09 21:07:46
|
Update of /cvsroot/naviserver/modules/nsfreetds In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23043/modules/nsfreetds Modified Files: nsfreetds.c Log Message: added missed TCL_DEFS in the global makefile Index: nsfreetds.c =================================================================== RCS file: /cvsroot/naviserver/modules/nsfreetds/nsfreetds.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** nsfreetds.c 8 Jun 2005 20:03:44 -0000 1.5 --- nsfreetds.c 9 Jun 2005 21:07:37 -0000 1.6 *************** *** 250,253 **** --- 250,254 ---- if(rc != TDS_SUCCEED && rc != TDS_NO_MORE_RESULTS) { Ns_Log(Error,"Db_GetRow(%s): tds_process_row_tokens: %d",handle->datasource,rc); + Db_Cancel(handle); return NS_ERROR; } *************** *** 291,294 **** --- 292,296 ---- if(IS_TDSDEAD(GET_TDS(handle))) { Ns_Log(Error, "Db_Cancel(%s): dead connection detected.", handle->datasource); + tds_free_all_results(GET_TDS(handle)); handle->statement = NULL; handle->fetchingRows = 0; |
From: Vlad S. <ser...@us...> - 2005-06-09 21:07:46
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23043/include Modified Files: Makefile.global.in Log Message: added missed TCL_DEFS in the global makefile Index: Makefile.global.in =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/Makefile.global.in,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile.global.in 4 Jun 2005 15:24:28 -0000 1.8 --- Makefile.global.in 9 Jun 2005 21:07:37 -0000 1.9 *************** *** 72,76 **** CFLAGS_EXTRA = @SHLIB_CFLAGS@ @TCL_EXTRA_CFLAGS@ DEFS = -DNO_CONST @DEFS@ ! CFLAGS += @CFLAGS_DEFAULT@ $(CFLAGS_WARNING) $(CFLAGS_EXTRA) $(CFLAGS_INCLUDE) @CPPFLAGS@ $(DEFS) ifndef NSBUILD --- 72,76 ---- CFLAGS_EXTRA = @SHLIB_CFLAGS@ @TCL_EXTRA_CFLAGS@ DEFS = -DNO_CONST @DEFS@ ! CFLAGS += @CFLAGS_DEFAULT@ @TCL_DEFS@ $(CFLAGS_WARNING) $(CFLAGS_EXTRA) $(CFLAGS_INCLUDE) @CPPFLAGS@ $(DEFS) ifndef NSBUILD |
From: Vlad S. <ser...@us...> - 2005-06-09 00:01:37
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv833 Modified Files: ChangeLog sample-config.tcl Log Message: added example of virtual hosting Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** ChangeLog 8 Jun 2005 20:28:51 -0000 1.91 --- ChangeLog 9 Jun 2005 00:01:22 -0000 1.92 *************** *** 1,4 **** --- 1,6 ---- 2005-06-08 Vlad Seryakov <ser...@us...> + * sample-config.tcl: added example of dynamic virtual hosting + * include/ns.h: * nsd/tclobjv.c: added Ns_ObjvByteArray function to Index: sample-config.tcl =================================================================== RCS file: /cvsroot/naviserver/naviserver/sample-config.tcl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sample-config.tcl 16 Feb 2005 16:45:43 -0000 1.2 --- sample-config.tcl 9 Jun 2005 00:01:22 -0000 1.3 *************** *** 61,65 **** set bindir [file dirname [ns_info nsd]] ! set pageroot ${homedir}/servers/${servername}/pages set directoryfile index.adp,index.html,index.htm,index.xhtml,index.xht --- 61,66 ---- set bindir [file dirname [ns_info nsd]] ! set serverdir ${homedir}/servers/${servername} ! set pageroot pages set directoryfile index.adp,index.html,index.htm,index.xhtml,index.xht *************** *** 157,161 **** ns_section "ns/server/${servername}" ns_param directoryfile $directoryfile ! ns_param pageroot $pageroot ns_param enabletclpages false ;# Parse *.tcl files in pageroot. # --- 158,162 ---- ns_section "ns/server/${servername}" ns_param directoryfile $directoryfile ! ns_param pageroot $serverdir/$pageroot ns_param enabletclpages false ;# Parse *.tcl files in pageroot. # *************** *** 196,200 **** # ADP special pages ! #ns_param errorpage ${pageroot}/errorpage.adp ;# ADP error page. --- 197,201 ---- # ADP special pages ! #ns_param errorpage ${serverdir}/${pageroot}/errorpage.adp ;# ADP error page. *************** *** 227,230 **** --- 228,236 ---- # # Parameters: + # + # serverdir Defines absolute path to server's home directory + # + # pageroot Defines absolute or relative to serverdir directory + # where all html/adp pages are located # # cache Boolean. Enable cache for normal URLs. *************** *** 252,256 **** # # ns_section "ns/server/${servername}/fastpath" ! # ns_param directorylisting fancy # # See also: --- 258,264 ---- # # ns_section "ns/server/${servername}/fastpath" ! # ns_param directorylisting fancy ! # ns_param serverdir ${serverdir} ! # ns_param pagedir ${pageroot} # # See also: *************** *** 286,293 **** ns_section "ns/server/${servername}/modules" ! ns_param nssock ${bindir}/nssock.so ! ns_param nslog ${bindir}/nslog.so ! #ns_param nscgi ${bindir}/nscgi.so ! #ns_param nsperm ${bindir}/nsperm.so --- 294,301 ---- ns_section "ns/server/${servername}/modules" ! ns_param nssock ${bindir}/nssock.so ! ns_param nslog ${bindir}/nslog.so ! #ns_param nscgi ${bindir}/nscgi.so ! #ns_param nsperm ${bindir}/nsperm.so *************** *** 327,340 **** # #ns_section "ns/server/${servername}/module/nscp" ! # ns_param address 127.0.0.1 ! # ns_param port 9999 ! # ns_param echopassword 1 ! # ns_param cpcmdlogging 1 # #ns_section "ns/server/${servername}/module/nscp/users" ! # ns_param user "nsadmin:t2GqvvaiIUbF2:" # #ns_section "ns/server/${servername}/modules" ! # ns_param nscp ${bindir}/nscp.so # --- 335,348 ---- # #ns_section "ns/server/${servername}/module/nscp" ! #ns_param address 127.0.0.1 ! #ns_param port 9999 ! #ns_param echopassword 1 ! #ns_param cpcmdlogging 1 # #ns_section "ns/server/${servername}/module/nscp/users" ! #ns_param user "nsadmin:t2GqvvaiIUbF2:" # #ns_section "ns/server/${servername}/modules" ! #ns_param nscp ${bindir}/nscp.so # *************** *** 352,367 **** # #ns_section "ns/modules" ! # ns_param nssock ${bindir}/nssock.so # #ns_section "ns/module/nssock" ! # ns_param port $httpport ! # ns_param hostname $hostname ! # ns_param address $address ! # ns_param defaultserver server1 # #ns_section "ns/module/nssock/servers" ! # ns_param server1 $hostname:$httpport # # --- 360,416 ---- # #ns_section "ns/modules" ! #ns_param nssock ${bindir}/nssock.so # #ns_section "ns/module/nssock" ! #ns_param port $httpport ! #ns_param hostname $hostname ! #ns_param address $address ! #ns_param defaultserver server1 # #ns_section "ns/module/nssock/servers" ! #ns_param server1 $hostname:$httpport # + # + # Example: Dynamic Host headers based virtual servers. + # + # To enable: + # + # 1. Enable by setting enabled to true. + # 2. For each hosted name create directory under ${serverdir} + # 3. Each virtual host directory should have ${pageroot} subdirectory + # + # /usr/local/ns/ + # servers/${servername} + # host.com/ + # pages + # domain.net/ + # pages + # + # + # Parameters: + # + # enabled Enable or disable virtual hosting + # hostprefix Prefix between serverdir and host name + # stripport Remove :port in the Host: header when + # building pageroot path so Host: www.host.com:80 + # will result in pageroot ${serverdir}/www.host.com + # stripwww Remove www. prefix from Host: header + # when building pageroot path so Host: www.host.com + # will result in pageroot ${serverdir}/host.com + # hosthashlevel Hash the leading characters of string into a path, skipping + # periods and slashes. If string contains less characters than + # levels requested, '_' characters are used as padding. + # For example, given the string 'foo' and the levels 2, 3: + # foo, 2 -> /f/o + # foo, 3 -> /f/o/o + # + + #ns_section "ns/server/${servername}/vhost" + #ns_param enabled true + #ns_param hostprefix "" + #ns_param hosthashlevel 0 + #ns_param stripport true + #ns_param stripwww true # *************** *** 411,417 **** # #ns_section ns/server/stats ! # ns_param enabled 1 ! # ns_param url /naviserver/stats ! # ns_param user nsadmin ! # ns_param password 23dfs!d # --- 460,466 ---- # #ns_section ns/server/stats ! #ns_param enabled 1 ! #ns_param url /naviserver/stats ! #ns_param user nsadmin ! #ns_param password 23dfs!d # |
From: Vlad S. <ser...@us...> - 2005-06-08 22:24:14
|
Update of /cvsroot/naviserver/modules/nsudp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14705 Added Files: README Log Message: added README file --- NEW FILE: README --- HTTP over UDP driver for NaviServer 4.x Release 1.0 vl...@cr... This is NaviServer module that implements HTTP over UDP support and adds new ns_udp command for sending UDP packets. /*--------------------------------------------------------------------*/ Configuration nsd.tcl ns_section ns/servers/server/modules ns_param nsudp nsudp.so ns_section ns/servers/server/module/nsudp ns_param address 0.0.0.0 ns_param port 80 Usage ns_udp ?-timeout N? ?-noreply? ipaddr port data ns_udp 127.0.0.1 80 "GET / HTTP/1.0\n\n" Authors Vlad Seryakov vl...@cr... |
From: Vlad S. <ser...@us...> - 2005-06-08 20:28:59
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16794 Modified Files: ChangeLog Log Message: added Ns_ObjvByteArray function Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** ChangeLog 8 Jun 2005 20:27:11 -0000 1.90 --- ChangeLog 8 Jun 2005 20:28:51 -0000 1.91 *************** *** 1,4 **** --- 1,8 ---- 2005-06-08 Vlad Seryakov <ser...@us...> + * include/ns.h: + * nsd/tclobjv.c: added Ns_ObjvByteArray function to + accept binary arrays as input parameters. + * nsd/tclcmds.c: * nsd/tclresp.c: added ns_returnbinary command to be able |
From: Vlad S. <ser...@us...> - 2005-06-08 20:27:27
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15813/nsd Modified Files: tclobjv.c tclresp.c Log Message: Added -binary flag to ns_respond to return binary data without encoding conversion Index: tclobjv.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclobjv.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tclobjv.c 15 May 2005 07:47:21 -0000 1.7 --- tclobjv.c 8 Jun 2005 20:27:12 -0000 1.8 *************** *** 310,313 **** --- 310,352 ---- *---------------------------------------------------------------------- * + * Ns_ObjvByteArray -- + * + * Consume exactly one argument, returning a pointer to it's + * cstring into *spec->dest. + * + * If spec->arg is != NULL it is assumed to be a pointer to an + * int and the returned string length will be left in it. + * + * Results: + * TCL_OK or TCL_ERROR. + * + * Side effects: + * None. + * + *---------------------------------------------------------------------- + */ + + int + Ns_ObjvByteArray(Ns_ObjvSpec *spec, Tcl_Interp *interp, int *objcPtr, + Tcl_Obj *CONST objv[]) + { + unsigned char **dest = spec->dest; + + if (*objcPtr > 0) { + if (spec->arg == NULL) { + *dest = Tcl_GetByteArrayFromObj(objv[0],0); + } else { + *dest = Tcl_GetByteArrayFromObj(objv[0], (int *) spec->arg); + } + *objcPtr -= 1; + return TCL_OK; + } + return TCL_ERROR; + } + + + /* + *---------------------------------------------------------------------- + * * Ns_ObjvObj -- * Index: tclresp.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclresp.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tclresp.c 8 Jun 2005 20:13:12 -0000 1.4 --- tclresp.c 8 Jun 2005 20:27:12 -0000 1.5 *************** *** 252,256 **** Ns_Conn *conn; int status = 200, length = -1; ! char *type = "*/*", *setid = NULL; char *string = NULL, *filename = NULL, *chanid = NULL; Ns_Set *set = NULL; --- 252,256 ---- Ns_Conn *conn; int status = 200, length = -1; ! char *type = "*/*", *setid = NULL, *binary = NULL; char *string = NULL, *filename = NULL, *chanid = NULL; Ns_Set *set = NULL; *************** *** 259,269 **** Ns_ObjvSpec opts[] = { ! {"-status", Ns_ObjvInt, &status, NULL}, ! {"-type", Ns_ObjvString, &type, NULL}, ! {"-length", Ns_ObjvInt, &length, NULL}, ! {"-headers", Ns_ObjvString, &setid, NULL}, ! {"-string", Ns_ObjvString, &string, NULL}, ! {"-file", Ns_ObjvString, &filename, NULL}, ! {"-fileid", Ns_ObjvString, &chanid, NULL}, {NULL, NULL, NULL, NULL} }; --- 259,270 ---- Ns_ObjvSpec opts[] = { ! {"-status", Ns_ObjvInt, &status, NULL}, ! {"-type", Ns_ObjvString, &type, NULL}, ! {"-length", Ns_ObjvInt, &length, NULL}, ! {"-headers", Ns_ObjvString, &setid, NULL}, ! {"-string", Ns_ObjvString, &string, NULL}, ! {"-file", Ns_ObjvString, &filename, NULL}, ! {"-fileid", Ns_ObjvString, &chanid, NULL}, ! {"-binary", Ns_ObjvByteArray, &binary, &length}, {NULL, NULL, NULL, NULL} }; *************** *** 277,282 **** return TCL_ERROR; } ! if ((string != NULL) + (filename != NULL) + (chanid != NULL) != 1) { ! Tcl_SetResult(interp, "must specify only one of -string, -file " "or -fileid", TCL_STATIC); return TCL_ERROR; --- 278,283 ---- return TCL_ERROR; } ! if ((binary != NULL) + (string != NULL) + (filename != NULL) + (chanid != NULL) != 1) { ! Tcl_SetResult(interp, "must specify only one of -string, -file, -binary " "or -fileid", TCL_STATIC); return TCL_ERROR; *************** *** 313,316 **** --- 314,324 ---- retval = Ns_ConnReturnFile(conn, status, type, filename); + } else if (binary != NULL) { + /* + * We'll be returning a binary data + */ + + retval = Ns_ConnReturnData(conn, status, binary, length, type); + } else { /* |
From: Vlad S. <ser...@us...> - 2005-06-08 20:27:22
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15813 Modified Files: ChangeLog Log Message: Added -binary flag to ns_respond to return binary data without encoding conversion Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** ChangeLog 8 Jun 2005 20:13:12 -0000 1.89 --- ChangeLog 8 Jun 2005 20:27:11 -0000 1.90 *************** *** 5,8 **** --- 5,10 ---- to return possibly binary data to the connection. Currently ns_return family support this from files or open fds only. + Added -binary flag to ns_respond to return binary data without + encoding conversion. 2005-06-08 Stephen Deasey <sd...@us...> |
From: Vlad S. <ser...@us...> - 2005-06-08 20:27:20
|
Update of /cvsroot/naviserver/naviserver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15813/include Modified Files: ns.h Log Message: Added -binary flag to ns_respond to return binary data without encoding conversion Index: ns.h =================================================================== RCS file: /cvsroot/naviserver/naviserver/include/ns.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ns.h 4 Jun 2005 13:33:15 -0000 1.19 --- ns.h 8 Jun 2005 20:27:12 -0000 1.20 *************** *** 827,830 **** --- 827,831 ---- NS_EXTERN Ns_ObjvProc Ns_ObjvDouble; NS_EXTERN Ns_ObjvProc Ns_ObjvString; + NS_EXTERN Ns_ObjvProc Ns_ObjvByteArray; NS_EXTERN Ns_ObjvProc Ns_ObjvObj; NS_EXTERN Ns_ObjvProc Ns_ObjvIndex; |
From: Vlad S. <ser...@us...> - 2005-06-08 20:13:38
|
Update of /cvsroot/naviserver/naviserver/nsd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8706/nsd Modified Files: tclcmds.c tclresp.c Log Message: added ns_returnbinary command which returns binary data without conversion/encoding Index: tclcmds.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclcmds.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tclcmds.c 18 Apr 2005 13:04:14 -0000 1.10 --- tclcmds.c 8 Jun 2005 20:13:12 -0000 1.11 *************** *** 142,145 **** --- 142,146 ---- NsTclReturnNoticeObjCmd, NsTclReturnObjCmd, + NsTclReturnBinaryObjCmd, NsTclReturnRedirectObjCmd, NsTclReturnUnauthorizedObjCmd, *************** *** 480,483 **** --- 481,485 ---- {"ns_returnunauthorized", NULL, NsTclReturnUnauthorizedObjCmd}, {"ns_returnnotfound", NULL, NsTclReturnNotFoundObjCmd}, + {"ns_returnbinary", NULL, NsTclReturnBinaryObjCmd}, /* Index: tclresp.c =================================================================== RCS file: /cvsroot/naviserver/naviserver/nsd/tclresp.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tclresp.c 27 Apr 2005 00:20:20 -0000 1.3 --- tclresp.c 8 Jun 2005 20:13:12 -0000 1.4 *************** *** 192,195 **** --- 192,236 ---- *---------------------------------------------------------------------- * + * NsTclReturnBinaryObjCmd -- + * + * Implements ns_returnbinary. Send complete response to client with + * given string as body. + * + * Results: + * Tcl result. + * + * Side effects: + * Connection will be closed. + * + *---------------------------------------------------------------------- + */ + + int + NsTclReturnBinaryObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) + { + Ns_Conn *conn; + unsigned char *data; + int len, status, result; + + if (objc != 4) { + Tcl_WrongNumArgs(interp, 1, objv, "status type data"); + return TCL_ERROR; + } + if (GetConn(arg, interp, &conn) != TCL_OK) { + return TCL_ERROR; + } + if (Tcl_GetIntFromObj(interp, objv[1], &status) != TCL_OK) { + return TCL_ERROR; + } + data = Tcl_GetByteArrayFromObj(objv[3], &len); + result = Ns_ConnReturnData(conn, status, data, len, Tcl_GetString(objv[2])); + + return Result(interp, result); + } + + + /* + *---------------------------------------------------------------------- + * * NsTclRespondObjCmd -- * |
From: Vlad S. <ser...@us...> - 2005-06-08 20:13:21
|
Update of /cvsroot/naviserver/naviserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8706 Modified Files: ChangeLog Log Message: added ns_returnbinary command which returns binary data without conversion/encoding Index: ChangeLog =================================================================== RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** ChangeLog 8 Jun 2005 16:29:12 -0000 1.88 --- ChangeLog 8 Jun 2005 20:13:12 -0000 1.89 *************** *** 1,2 **** --- 1,9 ---- + 2005-06-08 Vlad Seryakov <ser...@us...> + + * nsd/tclcmds.c: + * nsd/tclresp.c: added ns_returnbinary command to be able + to return possibly binary data to the connection. Currently + ns_return family support this from files or open fds only. + 2005-06-08 Stephen Deasey <sd...@us...> |