home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 November
/
PCWorld_2000-11_cd.bin
/
Komunik
/
sambar444
/
_SETUP.1
/
modules.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-01-12
|
2KB
|
98 lines
/*
** MODULES
**
** HTTP Wrapper for Sambar Server Modules.
**
** Confidential Property of Tod Sambar
** (c) Copyright Tod Sambar 1997
** All rights reserved.
**
**
** Public Functions:
**
** cgi_module
** wincgi_module
**
**
** History:
** Chg# Date Description Resp
** ---- ------- ------------------------------------------------------- ----
** 10NOV97 Created sambar
*/
#include <modules.h>
/*
** CGI_MODULE
**
** Execute the CGI request and return the results.
**
** Parameters:
** sactx Sambar Server context
** saconn Sambar Server connection
** sareq Command request data
** infop Error parameters
**
** Returns:
** SA_SUCCEED | SA_FAIL
**
** Notes:
** The Sambar Server only raises an error messages based on the
** infop return code if no data is sent by the module handler.
** In general, it is expected the module handler will return an
** appropriate error message.
*/
SA_RETCODE SA_PUBLIC
cgi_module(sactx, saconn, sarequest, infop)
SA_CTX *sactx;
SA_CONN *saconn;
SA_REQUEST *sarequest;
SA_INT *infop;
{
/* Execute the CGI request. */
if (sa_cgi_exec(sactx, saconn, sarequest) != SA_SUCCEED)
{
*infop = SA_E_NOTFOUND;
return (SA_FAIL);
}
return (SA_SUCCEED);
}
/*
** WINCGI_MODULE
**
** Execute the WinCGI request and return the results.
**
** Parameters:
** sactx Sambar Server context
** saconn Sambar Server connection
** sareq Command request data
** infop Error parameters
**
** Returns:
** SA_SUCCEED | SA_FAIL
**
** Notes:
** The Sambar Server only raises an error messages based on the
** infop return code if no data is sent by the module handler.
** In general, it is expected the module handler will return an
** appropriate error message.
*/
SA_RETCODE SA_PUBLIC
wincgi_module(sactx, saconn, sarequest, infop)
SA_CTX *sactx;
SA_CONN *saconn;
SA_REQUEST *sarequest;
SA_INT *infop;
{
/* Execute the CGI request. */
if (sa_wincgi_exec(sactx, saconn, sarequest) != SA_SUCCEED)
{
*infop = SA_E_NOTFOUND;
return (SA_FAIL);
}
return (SA_SUCCEED);
}