From 6aac072e73474f12af3c481b297ddbac02506582 Mon Sep 17 00:00:00 2001 From: watanaby <> Date: Mon, 16 Oct 2006 02:56:47 +0000 Subject: [PATCH] Ver.1.3.15: Fix browser's long waiting after sending accept page. And fix small bugs. --- opengate/doc/Changes.html | 5 +++++ opengate/doc/en/errcheck.html | 12 +++++++----- opengate/doc/en/install.html | 5 +++-- opengate/doc/ja/errcheck.html | 11 +++++++---- opengate/doc/ja/install.html | 2 ++ opengate/opengatesrv/Makefile | 2 +- opengate/opengatesrv/addr-convert.c | 8 ++++---- opengate/opengatesrv/auth-ftps.c | 6 ------ opengate/opengatesrv/auth-pop3s.c | 6 ------ opengate/opengatesrv/comm-cgi.c | 7 +------ opengate/opengatesrv/comm-ip6fw.c | 2 -- opengate/opengatesrv/comm-java.c | 6 +++--- opengate/opengatesrv/comm-ndp.c | 4 +--- opengate/opengatesrv/ctrl-firewall.c | 2 +- opengate/opengatesrv/get-param.c | 2 +- opengate/opengatesrv/htmltemplate.c | 1 - opengate/opengatesrv/opengateauth.c | 2 -- opengate/opengatesrv/opengatesrv.h | 9 +++++++++ opengate/opengatesrv/test-comm-java.c | 1 - opengate/opengatesrv/test-get-param.c | 6 +++--- opengate/opengatesrv/utilities.c | 5 ++--- opengate/opengatesrv/wrapper.c | 5 ++++- 22 files changed, 54 insertions(+), 55 deletions(-) diff --git a/opengate/doc/Changes.html b/opengate/doc/Changes.html index 3602e06..9b8e8fe 100644 --- a/opengate/doc/Changes.html +++ b/opengate/doc/Changes.html @@ -473,6 +473,11 @@ Ver.1.3.14 at 2006.5.23
Remove close-error message. Modify QA document.
+
+Ver.1.3.15 at 2006.10.14
+
+Fix browser's long waiting after sending accept page. And other small bugs. +
Please see CVS in SourceForge.net to check the file difference between versions. diff --git a/opengate/doc/en/errcheck.html b/opengate/doc/en/errcheck.html index 204c9c1..24d3cee 100644 --- a/opengate/doc/en/errcheck.html +++ b/opengate/doc/en/errcheck.html @@ -14,7 +14,7 @@
Following is the list of errors and the descriptions at each execution step in the form as; diff --git a/opengate/doc/en/install.html b/opengate/doc/en/install.html index 323af33..f19a809 100644 --- a/opengate/doc/en/install.html +++ b/opengate/doc/en/install.html @@ -778,6 +778,7 @@ want to use IPv6 function, you need to set FQDN corresponding to IPv4 and IPv6 b

F.4 Setup of ipfwõ

Write ipfw rules for for Opengate. This is example "rc.firewall".

+

From FreeBSD6.1, IPFW supports IPv6. The IPFW rule used in Opengate is affected by this change. See

F.5 Setup of ip6fwõ

-

Write ipfw rules for for Opengate. This is example "rc.firewall6". -

+

Write ipfw rules for for Opengate. This is example "rc.firewall6".

+

From FreeBSD6.1, IPFW supports IPv6. The IPFW rule used in Opengate is affected by this change. See ƒvƒƒOƒ‰ƒ€ƒtƒ[‰ðà‚ÆŠÖ˜Aƒ\ƒtƒgŠÔ‚̃vƒƒgƒRƒ‹‚ð—pˆÓ‚µ‚Ä‚¢‚Ü‚·BƒvƒƒOƒ‰ƒ€‚ÌŠî–{“I‚È“®‚«‚ð”cˆ¬‚µ‚Ä‚­‚¾‚³‚¢B

+•Ê‚ɁAƒvƒƒOƒ‰ƒ€ƒtƒ[‰ðà‚ÆŠÖ˜Aƒ\ƒtƒgŠÔ‚̃vƒƒgƒRƒ‹‚ð—pˆÓ‚µ‚Ä‚¢‚Ü‚·BƒvƒƒOƒ‰ƒ€‚ÌŠî–{“I‚È“®‚«‚ð”cˆ¬‚µ‚Ä‚­‚¾‚³‚¢B
  • -‚Ü‚½AƒeƒXƒgƒvƒƒOƒ‰ƒ€‚ð—pˆÓ‚µ‚Ü‚µ‚½Bopengatesrv’†‚Étest-*‚Æ‚µ‚Ä’u‚¢‚Ä‚¢‚Ü‚·‚ªAŽg‚¢•û‚̓\[ƒX‚ðŒ©‚Ä‚­‚¾‚³‚¢B
  • +‚Ü‚½AƒeƒXƒgƒvƒƒOƒ‰ƒ€‚ð—pˆÓ‚µ‚Ü‚µ‚½Bopengatesrv’†‚Étest-*‚Æ‚µ‚Ä’u‚¢‚Ä‚¢‚Ü‚·‚ªAŽg‚¢•û‚̓\[ƒX‚ðŒ©‚Ä‚­‚¾‚³‚¢B
  • -/var/log/opengate.log‚ÉŠJ•úA•Â½‚̃ƒO‚¨‚æ‚уGƒ‰[ƒƒO‚ðo—Í‚µ‚Ü‚·BƒGƒ‰[‚̏ꍇ‚Í‚±‚̃ƒO‚ðŠm”F‚­‚¾‚³‚¢B/etc/opengate/opengatesrv.conf“à‚ÌDebug‚ð1‚É‚·‚é‚ƁAƒfƒoƒbƒO‚Ì‚½‚߂̏î•ñ‚ð‘å—ʂɏo‚·‚悤‚É‚È‚è‚Ü‚·B‚Ü‚½AApache‚̃ƒO‚âƒVƒXƒeƒ€ƒƒO‚ðŠm”F‚­‚¾‚³‚¢B
  • +/var/log/opengate.log‚ÉŠJ•úA•Â½‚̃ƒO‚¨‚æ‚уGƒ‰[ƒƒO‚ðo—Í‚µ‚Ü‚·BƒGƒ‰[‚̏ꍇ‚Í‚±‚̃ƒO‚ðŠm”F‚­‚¾‚³‚¢B/etc/opengate/opengatesrv.conf“à‚ÌDebug‚ð1‚É‚·‚é‚ƁAƒfƒoƒbƒO‚Ì‚½‚߂̏î•ñ‚ð‘å—ʂɏo‚·‚悤‚É‚È‚è‚Ü‚·B‚Ü‚½AApache‚̃ƒO‚âƒVƒXƒeƒ€ƒƒO‚ðŠm”F‚­‚¾‚³‚¢B + +
  • /etc/opengate/opengatesrv.conf‚ªÝ’èƒtƒ@ƒCƒ‹‚Å‚·Bmake install‚ł́A/etc/opengate/opengatesrv.conf.sample‚ªì‚ç‚ê‚Ü‚·‚̂ŁA‚±‚ê‚ðopengatesrv.conf‚ɃRƒs[‚µ‚Ä‚­‚¾‚³‚¢BÝ’èƒtƒ@ƒCƒ‹‚́Aƒo[ƒWƒ‡ƒ“‚É‚æ‚Á‚Đݒ荀–Ú‚Ì‘Œ¸‚ª‚ ‚è‚Ü‚·‚̂ŁA‘Ήž‚·‚éƒo[ƒWƒ‡ƒ“‚Ì‚à‚Ì‚ðŽg‚Á‚Ä‚­‚¾‚³‚¢B
  • +
    ˆÈ‰ºAŠe“®ì‚ɂ‚¢‚āA‚»‚ÌŽž‚̃Gƒ‰[ó‹µ‚ƑΉž‚ð—ñ‹“‚µ‚Ü‚·B @@ -115,7 +118,7 @@ Opengate -

    +
  • ŽŸ‚Éopengateauth.cgi‚ª“®ì‚µ‚āAindex.html‚Ìkeyword‚ð’u‚«Š·‚¦‚½”FØ—v‹ƒy[ƒW‚ð‘—‚èo‚·B‚±‚̃y[ƒW‚Í”FØ—v‹‚ð•\Ž¦‚·‚éB
  • diff --git a/opengate/doc/ja/install.html b/opengate/doc/ja/install.html index c1b3db9..7c90679 100644 --- a/opengate/doc/ja/install.html +++ b/opengate/doc/ja/install.html @@ -769,6 +769,7 @@ CONFIGPATH = /etc/opengate

    Opengate‚Ì“®ì‚Ì‚½‚ß‚É“KØ‚Ƀtƒ@ƒCƒAƒEƒH[ƒ‹‚̃‹[ƒ‹‚ð‹Lq‚µ‚È‚¯‚ê‚΂Ȃç‚È‚¢BˆÈ‰º‚É‹Lq‚·‚郋[ƒ‹‚Ì—á‚ðŽ¦‚·B

    +

    ’ˆÓFFreeBSD6.1‚©‚çipfw‚ªIPv6‚ɑΉž‚µ‚½”Å‚É‚È‚Á‚½‚½‚߁AOpengate‚Ìipfwƒ‹[ƒ‹‚à‰e‹¿‚ðŽó‚¯‚éBFreeBSD6.1ˆÈ~‚Å‚ÌipfwÝ’è‚ðŽQÆ‚Ì‚±‚ƁB

     ### set these to your outside interface network and netmask and ip
    @@ -837,6 +838,7 @@ ipfw
     
     

    ‚±‚ê‚ÍIPv6ƒpƒPƒbƒg‚̃tƒ@ƒCƒAƒEƒH[ƒ‹Ý’è‚Å‚ ‚èAIPv6‹@”\‚ð—˜—p‚µ‚È‚¢ê‡‚Í•s—v‚Å‚ ‚éBOpengate‚Ì“®ì‚Ì‚½‚ß‚É“KØ‚Ƀtƒ@ƒCƒAƒEƒH[ƒ‹‚̃‹[ƒ‹‚ð‹Lq‚µ‚È‚¯‚ê‚΂Ȃç‚È‚¢BˆÈ‰º‚É‹Lq‚·‚ׂ«ƒ‹[ƒ‹‚Ì—ái/etc/rc.firewall6j‚ðŽ¦‚·B

    +

    ’ˆÓFFreeBSD6.1‚©‚çipfw‚ªIPv6‚ɑΉž‚µ‚½”Å‚É‚È‚Á‚½‚½‚߁AOpengate‚Ìipfwƒ‹[ƒ‹‚à‰e‹¿‚ðŽó‚¯‚éBFreeBSD6.1ˆÈ~‚Å‚ÌipfwÝ’è‚ðŽQÆ‚Ì‚±‚ƁB

    \r\n"); printf("
     ### set these to your outside interface network and prefixlen and ip
    diff --git a/opengate/opengatesrv/Makefile b/opengate/opengatesrv/Makefile
    index dc99874..0c98c07 100644
    --- a/opengate/opengatesrv/Makefile
    +++ b/opengate/opengatesrv/Makefile
    @@ -7,7 +7,7 @@ DOCPATH = /usr/local/www/data/opengate
     CGIPATH = /usr/local/www/cgi-bin/opengate
     CONFIGPATH = /etc/opengate
     
    -CFLAGS= 
    +CFLAGS= -O4 -Wall
     LIBS = -lssl -lcrypto -lradius -lpam -lezxml -L../ezxml
     OBJS = utilities.o comm-auth.o comm-cgi.o comm-java.o comm-ipfw.o comm-ip6fw.c comm-arp.o comm-ndp.o error.o tcp_connect.o sock_ntop_host.o wrapper.o signal.o auth-pam.o auth-rad.o auth-pop3s.o comm-userdb.o get-param.o auth-ftps.o htmltemplate.o addr-convert.o get-mac.o ctrl-firewall.o
     MAINPROGO = main.o
    diff --git a/opengate/opengatesrv/addr-convert.c b/opengate/opengatesrv/addr-convert.c
    index 064ce91..dd371d7 100644
    --- a/opengate/opengatesrv/addr-convert.c
    +++ b/opengate/opengatesrv/addr-convert.c
    @@ -55,9 +55,9 @@ int addrEncode(char encodeAddr[], char dotSepAddr[])
       /* the string has the from as [encodeAddress-checkDigit-TimeNow] */
       if(!illform){
         snprintf(encodeAddr, ADDRMAXLN,
    -	     "%u-%d-%d", address,checkDigit, time(NULL));
    +	     "%lu-%d-%d", address,checkDigit, time(NULL));
       }else{
    -    snprintf(encodeAddr, ADDRMAXLN, "");
    +    encodeAddr[0]='\0';
       }
     
       return illform;
    @@ -77,7 +77,7 @@ int addrDecode(char dotSepAddr[], char encodeAddr[])
       time_t encodeTiming, diffTime;
     
       /* convert string to integer */
    -  if(sscanf(encodeAddr, "%u-%d-%d", &address, &checkDigit, &encodeTiming)!=3){
    +  if(sscanf(encodeAddr, "%lu-%d-%d", &address, &checkDigit, &encodeTiming)!=3){
         illform=1;
       }
     
    @@ -102,7 +102,7 @@ int addrDecode(char dotSepAddr[], char encodeAddr[])
       if(!illform){
         snprintf(dotSepAddr, ADDRMAXLN, "%d.%d.%d.%d", ad[3], ad[2], ad[1], ad[0]);
       }else{
    -    snprintf(dotSepAddr, ADDRMAXLN, "");
    +    dotSepAddr[0]='\0';
       }
     
       return illform;
    diff --git a/opengate/opengatesrv/auth-ftps.c b/opengate/opengatesrv/auth-ftps.c
    index e2f560d..0bc7fdb 100644
    --- a/opengate/opengatesrv/auth-ftps.c
    +++ b/opengate/opengatesrv/auth-ftps.c
    @@ -29,12 +29,6 @@ Email: watanaby@is.saga-u.ac.jp
        Apache module mod_auth_pam.c by Ingo Luetkebohle
     */
     
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -
     #include "opengatesrv.h"
     
     /*****************************************/
    diff --git a/opengate/opengatesrv/auth-pop3s.c b/opengate/opengatesrv/auth-pop3s.c
    index a802678..8d4b9ac 100644
    --- a/opengate/opengatesrv/auth-pop3s.c
    +++ b/opengate/opengatesrv/auth-pop3s.c
    @@ -28,12 +28,6 @@ Email: watanaby@is.saga-u.ac.jp
        Apache module mod_auth_pam.c by Ingo Luetkebohle
     */
     
    -#include 
    -#include 
    -#include 
    -#include 
    -#include 
    -
     #include "opengatesrv.h"
     
     /*************************/
    diff --git a/opengate/opengatesrv/comm-cgi.c b/opengate/opengatesrv/comm-cgi.c
    index eeafaab..cce43d1 100644
    --- a/opengate/opengatesrv/comm-cgi.c
    +++ b/opengate/opengatesrv/comm-cgi.c
    @@ -56,12 +56,10 @@ int getPostData(char *userid, char *password, char *clientAddr4, int *durationPt
       char *value[1];
       char *next[1];
       char *ptr;
    -  int item;
       char durationStr[WORDMAXLN];
       char langList[BUFFMAXLN];
       char encodeAddr4[ADDRMAXLN];
       char accessAddr[ADDRMAXLN];
    -  int ret;
     
       /* get content sent from web input */
       if(getenv("CONTENT_LENGTH")==NULL)return FALSE;
    @@ -145,7 +143,6 @@ int getPostData(char *userid, char *password, char *clientAddr4, int *durationPt
     /*********************************************/
     void putClientDeny(char *clientAddr4)
     {
    -  FILE *fp;
       char denydoc[BUFFMAXLN];
       char authCgiUrl[BUFFMAXLN];
       char encodeAddr[ADDRMAXLN];
    @@ -191,7 +188,6 @@ void putClientDeny(char *clientAddr4)
     /*********************************************/
     void putClientRetry(char *lang)
     {
    -  FILE *fp;
       char retrydoc[BUFFMAXLN];
       char externalUrl[BUFFMAXLN];
       char authCgiUrl[BUFFMAXLN];
    @@ -249,7 +245,6 @@ void putJavaApplet(char *userid, int port, int pid, char *clientAddr4, char *cli
       int markfound=0;
       char acceptdoc[BUFFMAXLN];
       char acceptdoc2url[BUFFMAXLN];
    -  char *ptr;
       char terminateurl[BUFFMAXLN];
     
       char *startPageUrl=GetConfValue("StartPage/Url");
    @@ -297,7 +292,7 @@ void putJavaApplet(char *userid, int port, int pid, char *clientAddr4, char *cli
             printf("IPv4 address : [%s]\r\n",clientAddr4);
             printf("
    \r\n"); - }else if(ipStatus=IPV46DUAL){ + }else if(ipStatus==IPV46DUAL){ printf("\r\n"); printf("
    \r\n"); printf("IPv4 address : [%s]\r\n",clientAddr4); diff --git a/opengate/opengatesrv/comm-ip6fw.c b/opengate/opengatesrv/comm-ip6fw.c index 9c128dd..21c53d0 100644 --- a/opengate/opengatesrv/comm-ip6fw.c +++ b/opengate/opengatesrv/comm-ip6fw.c @@ -39,8 +39,6 @@ int openClientGate6(char *clientAddr6, char *userid, char *macAddr6, char *userP int fd; int ret=0; int retNum; - int ruleCount; - int ruleNumber; Sigfunc *defaultSigFunc; diff --git a/opengate/opengatesrv/comm-java.c b/opengate/opengatesrv/comm-java.c index f715f3d..f4756c1 100644 --- a/opengate/opengatesrv/comm-java.c +++ b/opengate/opengatesrv/comm-java.c @@ -107,10 +107,10 @@ int getListenPort(void) int waitAppletConnect(char *userid, char *clientAddr4, char *clientAddr6, int duration, char *macAddr4, int ipStatus, struct clientAddr *pClientAddr) { socklen_t len; - fd_set rfd, rfd0; /* fd_set for select */ - int n,i; /* counter */ + fd_set rfd0; /* fd_set for select */ + int n; /* counter */ int smax; /* select max descliptor */ - int ipType; /* using IP type */ + int ipType=IPV4; /* using IP type */ struct sockaddr_storage cliaddr; /* client IP adddress */ char buff[BUFFMAXLN]; /* read in buffer */ Sigfunc *sigfunc; /* signal function save */ diff --git a/opengate/opengatesrv/comm-ndp.c b/opengate/opengatesrv/comm-ndp.c index bb18075..3779c74 100644 --- a/opengate/opengatesrv/comm-ndp.c +++ b/opengate/opengatesrv/comm-ndp.c @@ -37,7 +37,6 @@ void scanNdpEntry(struct clientAddr *pClientAddr, char *userid, char *macAddr6, char *startp; char buf[BUFFMAXLN]; char tmpAddr[ADDRMAXLN]=""; - int pid; struct clientAddr *tmp1, *tmp2, *lastAddr; /* exec ndp */ @@ -52,7 +51,7 @@ void scanNdpEntry(struct clientAddr *pClientAddr, char *userid, char *macAddr6, /* get IPv6 address from above string */ /* clear active status for IPv6 address */ - tmp1=pClientAddr; + lastAddr=tmp1=pClientAddr; while(tmp1!=NULL){ if(tmp1->ipType==IPV6) tmp1->activeStatus=FALSE; lastAddr=tmp1; @@ -159,7 +158,6 @@ int getMacAddrFromNdp(char *clientAddr6, char* macAddr6) FILE *fpipe; char buf[BUFFMAXLN]; char *startp; - char *endp; macAddr6[0]='?'; macAddr6[1]='\0'; diff --git a/opengate/opengatesrv/ctrl-firewall.c b/opengate/opengatesrv/ctrl-firewall.c index b6ae295..9d90119 100644 --- a/opengate/opengatesrv/ctrl-firewall.c +++ b/opengate/opengatesrv/ctrl-firewall.c @@ -39,7 +39,7 @@ void KillOverlapProcess(int overlapRule4, int overlapRule6, int openClientGate(char *clientAddr4, char *macAddr4, char *clientAddr6, char *macAddr6, char *userid, char *userProperty, int ipStatus) { int ret; - struct clientAddr *pLastClientAddr; + struct clientAddr *pLastClientAddr=NULL; int overlapRule4=0, overlapRule6=0; switch(ipStatus){ diff --git a/opengate/opengatesrv/get-param.c b/opengate/opengatesrv/get-param.c index d6a56e9..a37c1fa 100644 --- a/opengate/opengatesrv/get-param.c +++ b/opengate/opengatesrv/get-param.c @@ -223,7 +223,7 @@ char *getConfValue(char *name) }else{ /* other parameters must be set */ - err_msg("ERR at %s#%d: cannot get %s",__FILE__,__LINE__,name); + err_msg("ERR at %s#%d: cannot get %s from conf file. Is it new?",__FILE__,__LINE__,name); } } diff --git a/opengate/opengatesrv/htmltemplate.c b/opengate/opengatesrv/htmltemplate.c index 3880605..7812c70 100644 --- a/opengate/opengatesrv/htmltemplate.c +++ b/opengate/opengatesrv/htmltemplate.c @@ -83,7 +83,6 @@ char* strSplit(char* str,const char* delimStr) { char* delimPoint = strstr(str,delimStr); const size_t delimLen = strlen(delimStr); - size_t i; if(delimPoint == NULL) return NULL; else{ diff --git a/opengate/opengatesrv/opengateauth.c b/opengate/opengatesrv/opengateauth.c index 7dd9045..6227082 100644 --- a/opengate/opengatesrv/opengateauth.c +++ b/opengate/opengatesrv/opengateauth.c @@ -32,14 +32,12 @@ int main(int argc, char **argv) char htmlFile[BUFFMAXLN]=""; /* html file */ char lang[WORDMAXLN]=""; /* language */ - char referer[BUFFMAXLN]=""; /* HTTP referer */ char clientAddr[ADDRMAXLN]=""; /* client ip address */ char paramString[BUFFMAXLN]=""; /* parameters in html access */ char* pLang; /* pointer to language string */ char* pAddr4; /* pointer to addr4 string */ char authCgiUrl[BUFFMAXLN]; /* url of opengateauth.cgi */ char mainCgiUrl[BUFFMAXLN]; /* url of opengatesrv.cgi */ - char remoteAddr[ADDRMAXLN]; /* remote address */ char durationMax[WORDMAXLN]; /* usage duration maximum */ /* keyword pairs */ diff --git a/opengate/opengatesrv/opengatesrv.h b/opengate/opengatesrv/opengatesrv.h index 973ffc0..570c47f 100644 --- a/opengate/opengatesrv/opengatesrv.h +++ b/opengate/opengatesrv/opengatesrv.h @@ -57,6 +57,12 @@ typedef void Sigfunc(int); /* for signal handlers */ #include #include +#include +#include +#include +#include +#include + /***************** constants ***********************/ /* Configuration file for opengate */ @@ -150,6 +156,9 @@ int WaitAppletConnect(char *userid, char *clientAddr4, char *clientAddr6, int du /* utilities */ ssize_t readln(int fd, void *ptr, size_t maxlen); void Writefmt(int fd, const char *fmt, ...); +ssize_t +readlnSSL(SSL *fd, void *vptr, size_t maxlen); +void WritefmtSSL(SSL *fd, const char *fmt, ...); int Lock(int fd); int Unlock(int fd); FILE *Popenl(const char *type, const char *path, ...); diff --git a/opengate/opengatesrv/test-comm-java.c b/opengate/opengatesrv/test-comm-java.c index bd7b455..5e92f1e 100644 --- a/opengate/opengatesrv/test-comm-java.c +++ b/opengate/opengatesrv/test-comm-java.c @@ -33,7 +33,6 @@ int main(int argc, char **argv) char clientAddr6[100]="::1"; char userID[100]="user1"; char extraID[100]="default"; - char dummy[100]; int duration=60; struct clientAddr ClientAddr; struct clientAddr *pClientAddr; diff --git a/opengate/opengatesrv/test-get-param.c b/opengate/opengatesrv/test-get-param.c index d8475f6..3df3f46 100644 --- a/opengate/opengatesrv/test-get-param.c +++ b/opengate/opengatesrv/test-get-param.c @@ -49,11 +49,11 @@ int main(int argc, char **argv) printf("Enter extraID(if you do not want to use extraID, enter as [default])="); scanf("%s", extraID); - setupConfExtra(userID, extraID); + SetupConfExtra(userID, extraID); printf("Enter Parameter name (eg, Authserver/protocol)="); scanf("%s", name); - printf("%s\n", getConfValue(name)); - closeConfFile(); + printf("%s\n", GetConfValue(name)); + CloseConfFile(); return 0; } diff --git a/opengate/opengatesrv/utilities.c b/opengate/opengatesrv/utilities.c index 04c1bdf..fedcb91 100644 --- a/opengate/opengatesrv/utilities.c +++ b/opengate/opengatesrv/utilities.c @@ -48,8 +48,7 @@ void Writefmt(int fd, const char *fmt, ...) return; } - -void WritefmtSSL(int fd, const char *fmt, ...) +void WritefmtSSL(SSL *fd, const char *fmt, ...) { char buff[BUFFMAXLN]; va_list ap; @@ -109,7 +108,7 @@ readln(int fd, void *vptr, size_t maxlen) ssize_t -readlnSSL(int fd, void *vptr, size_t maxlen) +readlnSSL(SSL *fd, void *vptr, size_t maxlen) { ssize_t n, rc; char *ptr,c; diff --git a/opengate/opengatesrv/wrapper.c b/opengate/opengatesrv/wrapper.c index 17ee24c..d548db6 100644 --- a/opengate/opengatesrv/wrapper.c +++ b/opengate/opengatesrv/wrapper.c @@ -24,7 +24,10 @@ Close(int fd) /* if ((ret=close(fd)) == -1) * err_msg("close error"); */ - return ret; + + ret=close(fd); + + return ret; } pid_t -- 2.11.0