proto_mod.c (ssldump-0.9b3) | : | proto_mod.c (ssldump-1.3) | ||
---|---|---|---|---|
skipping to change at line 44 | skipping to change at line 44 | |||
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY SUCH DAMA GE. | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY SUCH DAMA GE. | |||
$Id: proto_mod.c,v 1.3 2001/07/20 23:33:14 ekr Exp $ | $Id: proto_mod.c,v 1.3 2001/07/20 23:33:14 ekr Exp $ | |||
ekr@rtfm.com Thu Jan 7 22:35:23 1999 | ekr@rtfm.com Thu Jan 7 22:35:23 1999 | |||
*/ | */ | |||
static char *RCSSTRING="$Id: proto_mod.c,v 1.3 2001/07/20 23:33:14 ekr Exp $"; | ||||
#include "network.h" | #include "network.h" | |||
int create_proto_handler(mod,ctx,handlerp,conn,first_packet) | int create_proto_handler(mod,ctx,handlerp,conn,first_packet) | |||
proto_mod *mod; | proto_mod *mod; | |||
proto_ctx *ctx; | proto_ctx *ctx; | |||
proto_handler **handlerp; | proto_handler **handlerp; | |||
tcp_conn *conn; | tcp_conn *conn; | |||
struct timeval *first_packet; | struct timeval *first_packet; | |||
{ | { | |||
int r,_status; | int r,_status; | |||
proto_handler *handler=0; | proto_handler *handler=0; | |||
if(!(handler=(proto_handler *)calloc(sizeof(proto_handler),1))) | if(!(handler=(proto_handler *)calloc(1,sizeof(proto_handler)))) | |||
ABORT(R_NO_MEMORY); | ABORT(R_NO_MEMORY); | |||
handler->vtbl=mod->vtbl; | handler->vtbl=mod->vtbl; | |||
if(r=mod->vtbl->create(mod->handle,ctx,conn,&handler->obj, | if((r=mod->vtbl->create(mod->handle,ctx,conn,&handler->obj, | |||
&conn->i_addr,conn->i_port,&conn->r_addr,conn->r_port,first_packet)) | &conn->i_addr,conn->i_port,&conn->r_addr,conn->r_port,first_packet))) | |||
ABORT(r); | ABORT(r); | |||
*handlerp=handler; | *handlerp=handler; | |||
_status=0; | _status=0; | |||
abort: | abort: | |||
if(_status){ | if(_status){ | |||
destroy_proto_handler(&handler); | destroy_proto_handler(&handler); | |||
} | } | |||
return(_status); | return(_status); | |||
End of changes. 3 change blocks. | ||||
5 lines changed or deleted | 3 lines changed or added |