diff --git a/libraries/SITL/examples/JSON/MATLAB/tcp_udp_ip_2.0.6/pnet.c b/libraries/SITL/examples/JSON/MATLAB/tcp_udp_ip_2.0.6/pnet.c index 83b545d59f..41d59899af 100644 --- a/libraries/SITL/examples/JSON/MATLAB/tcp_udp_ip_2.0.6/pnet.c +++ b/libraries/SITL/examples/JSON/MATLAB/tcp_udp_ip_2.0.6/pnet.c @@ -5,7 +5,7 @@ #define VERSION "Version 2.0.5 2003-09-16" /* -% This file(s) is part of the tcp_udp_ip toolbox (C) Peter Rydesäter et al. +% This file(s) is part of the tcp_udp_ip toolbox (C) Peter Rydes�ter et al. % et al. 1998-2003 for running in MATLAB(R) as scripts and/or plug-ins. % % This program is free software; you can redistribute it and/or modify @@ -22,7 +22,7 @@ % along with this program; if not, write to the Free Software % Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA % -% In addition, as a SPECIAL EXCEPTION, Peter Rydesäter, SWEDEN, +% In addition, as a SPECIAL EXCEPTION, Peter Rydes�ter, SWEDEN, % gives permission to link the code of this program with any library, % and distribute linked combinations of it. You must obey the GNU % General Public License in all respects for all of the code in the @@ -49,9 +49,9 @@ == Main Authour == == Windows support == == Earlie/Basic UDP support == - Peter Rydesäter Mario Bergeron Mike Medeiros at 23-Jan-2001. + Peter Rydes�ter Mario Bergeron Mike Medeiros at 23-Jan-2001. LYRtech - Östersund, Sweden Québec, Canada + �stersund, Sweden Qu�bec, Canada +46 70 560 68 16 Peter.Rydesater@mh.se Mario.Bergeron@lyrtech.com @@ -186,7 +186,7 @@ void Print_Start_Message() { "Loaded pnet MEX-file for the tcp/udp/ip-toolbox Compiled @ " __DATE__ " " __TIME__ "\n" VERSION "\n" - "Copyright (C) Peter Rydesäter, Sweden, et al. , 1998 - 2003\n" + "Copyright (C) Peter Rydes�ter, Sweden, et al. , 1998 - 2003\n" "GNU General Public License, se license.txt for full license notis.\n" "You are allowed to (dynamicaly) link this file with non-free code. \n\n" " http://www.rydesater.com \n\n" @@ -765,7 +765,7 @@ void my_mexReturnArrayFromBuff(const int argno,io_buff *buff,const int line) } gret_args++; } - // debug_view_con_status("GET_ARRAY NÄSTAN KLAR"); + // debug_view_con_status("GET_ARRAY N�STAN KLAR"); // Delete from read buffer if not "VIEW" option and dims filled if(my_mexFindInputOption(argno+1,"VIEW")==0 && deleteelements>0 ) { buff->pos-=deleteelements*si; @@ -822,13 +822,16 @@ int writedata() // len=65534; while(sentlen0?retval:0; sentlen+=lastsize; /* if( retval==0){ @@ -1274,8 +1277,11 @@ void mexFunction( return; } if(myoptstrcmp(fun,"WRITEPACKET")==0) { - if(IS_STATUS_UDP_NO_CON(con[con_index].status)) - ipv4_lookup(my_mexInputOptionString(2),my_mexInputScalar(3)); + if (my_mexIsInputArgOK(2)) { + if (IS_STATUS_UDP_NO_CON(con[con_index].status)) { + ipv4_lookup(my_mexInputOptionString(2),my_mexInputScalar(3)); + } + } my_mexReturnValue(writedata()); con[con_index].write.pos=0; return;