--- parser3/src/classes/inet.C 2015/08/20 22:16:47 1.9 +++ parser3/src/classes/inet.C 2016/10/04 13:23:45 1.13 @@ -1,7 +1,7 @@ /** @file Parser: @b inet parser class. - Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2015 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ @@ -10,10 +10,11 @@ #include "pa_vtable.h" #ifdef _MSC_VER +#include "winsock2.h" #include "ws2tcpip.h" #endif -volatile const char * IDENT_INET_C="$Id: inet.C,v 1.9 2015/08/20 22:16:47 moko Exp $"; +volatile const char * IDENT_INET_C="$Id: inet.C,v 1.13 2016/10/04 13:23:45 moko Exp $"; class MInet: public Methoded { public: @@ -22,7 +23,7 @@ public: // global variables -DECLARE_CLASS_VAR(inet, new MInet, 0); +DECLARE_CLASS_VAR(inet, new MInet); static void _ntoa(Request& r, MethodParams& params){ @@ -101,7 +102,7 @@ static void _ip2name(Request& r, MethodP if(HashStringValue* options=params.as_hash(1)){ int valid_options=0; if(Value* value=options->get("ipv")){ - hints.ai_family=ipv_format(r.process_to_value(*value).as_string()); + hints.ai_family=ipv_format(r.process(*value).as_string()); valid_options++; } if(valid_options!=options->count()) @@ -143,11 +144,11 @@ static void _name2ip(Request& r, MethodP if(HashStringValue* options=params.as_hash(1)){ int valid_options=0; if(Value* value=options->get("ipv")){ - hints.ai_family=ipv_format(r.process_to_value(*value).as_string()); + hints.ai_family=ipv_format(r.process(*value).as_string()); valid_options++; } if(Value* value=options->get("table")){ - if(r.process_to_value(*value).as_bool()){ + if(r.process(*value).as_bool()){ Table::columns_type columns(new ArrayString); static const String sip("ip"), sversion("version"); *columns+=&sip; *columns+=&sversion;