javacommons/gcfprotocols/socket/socket/javasrc.s60/com/nokia/mj/impl/gcf/protocol/socket/Protocol.java
branchRCL_3
changeset 83 26b2b12093af
parent 71 d5e927d5853b
equal deleted inserted replaced
77:7cee158cb8cd 83:26b2b12093af
   149         if (SocURL.host == null)
   149         if (SocURL.host == null)
   150         {
   150         {
   151             Logger.LOG(Logger.ESOCKET, Logger.EInfo,
   151             Logger.LOG(Logger.ESOCKET, Logger.EInfo,
   152                        "socket - protocol class : server connection");
   152                        "socket - protocol class : server connection");
   153             ApplicationUtils appUtils = ApplicationUtils.getInstance();
   153             ApplicationUtils appUtils = ApplicationUtils.getInstance();
   154             SocketPermissionImpl per = new SocketPermissionImpl(SocketPermissionImpl.SERVER_TARGET);
   154             SocketPermissionImpl per = new SocketPermissionImpl("socket://");
   155             appUtils.checkPermission(per);
   155             appUtils.checkPermission(per);
   156             /* security related stuff */
   156             /* security related stuff */
   157             Logger.LOG(Logger.ESOCKET, Logger.EInfo,
   157             Logger.LOG(Logger.ESOCKET, Logger.EInfo,
   158                        "socket - protocol class : after security check");
   158                        "socket - protocol class : after security check");
   159             return new ServerSocketConnectionImpl(SocURL, aMode);
   159             return new ServerSocketConnectionImpl(SocURL, aMode);
   166             {
   166             {
   167                 /* client connecction should have a port number */
   167                 /* client connecction should have a port number */
   168                 throw new IllegalArgumentException("Invalid URL: " + fullurl);
   168                 throw new IllegalArgumentException("Invalid URL: " + fullurl);
   169             }
   169             }
   170             ApplicationUtils appUtils = ApplicationUtils.getInstance();
   170             ApplicationUtils appUtils = ApplicationUtils.getInstance();
   171             SocketPermissionImpl per = new SocketPermissionImpl(SocketPermissionImpl.CLIENT_TARGET);
   171             SocketPermissionImpl per = new SocketPermissionImpl("socket://*");
   172             appUtils.checkPermission(per);
   172             appUtils.checkPermission(per);
   173             /* security related stuff */
   173             /* security related stuff */
   174             Logger.LOG(Logger.ESOCKET, Logger.EInfo,
   174             Logger.LOG(Logger.ESOCKET, Logger.EInfo,
   175                        "socket - protocol class : after security check");
   175                        "socket - protocol class : after security check");
   176 
   176