private void processResolveFrame(int channelPtr,
                                     int ctype,
                                     int flag,
                                     ByteBuffer data) {
        OpenRequest request;
        Channel channel;
        ChannelError error;
        ByteBuffer path;

         synchronized (this) {
             request = m_pendingOpenRequest;
         }

         if (request == null) {
             destroy(new ChannelError("The server sent a invalid resolve"));
             return;
         }

         channel = request.getChannel();

         if (flag != Frame.OPEN_ALLOW) {
             error = new ChannelError("Unable to resolve path");
             channel.destroy(error);
             return;
         }

         if (HydnaDebug.HYDNADEBUG) {
             Charset charset;
             CharsetDecoder decoder;
             String content;
             int pos;

             pos = data.position();
             charset = Charset.forName("UTF-8");
             decoder = charset.newDecoder();
             content = null;

             try {
                 content = decoder.decode(data).toString();
             } catch (CharacterCodingException ex) {
             }

             DebugHelper.debugPrint("Connection",
                                    channelPtr,
                                    "received lookup for: '"
                                        + content + "'");
         }

         path = request.getPath();
         path.position(0);
         data.position(0);

         if (data.equals(path) == false) {
             error = new ChannelError("Bad path sent by server");
             channel.destroy(error);
             return;
         }

         request.setChannelPtr(channelPtr);
         channel.resolveSuccess();
    }