function [err,errmsg] = OsiStopServer(ConNo)
%
% OsiStopServer.m			Close all connections and stop the OLGA Server.   
%
% The calling syntax is:
%
%   [err,errmsg] = OsiStopServer(ConNo);
% Input:
%   ConNo: Connnection number (default: ConNo=1)
%
% Copyright (c) 1998 by ABB Corporate Research.
% All Rights Reserved.
%
% $Revision: 1.0, 5/10-1998 by Kjetil Havre$
% $Revision: 1.1, 20/7-2005 by Espen Storkaas, ABB-EOP, included user-defined connection number$ 


  if nargin==0
      ConNo=1;
  end
  if nargin > 1 
     errmsg = 'OsiStopServer usage: [err, errmsg] = OsiStopServer';
     disp(errmsg);
     err = -1;
     return
  end

  [err, msg, ibody, rbody, errmsg] = osmi(ConNo, 'OLGA_STOP_SERVER', [], [], []);

  