Show
Ignore:
Timestamp:
09/02/07 09:29:14 PM (16 months ago)
Author:
octorian
Message:

Merge of connection updates

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/LogicMail/src/org/logicprobe/LogicMail/util/Connection.java

    r136 r144  
    299299                 * Write the string up to there and terminate it properly. 
    300300                 */ 
    301                 output.write(bytes, i, j - i); 
    302                 output.write(CRLF, 0, 2); 
     301                output.write((s.substring(i, j)+"\r\n").getBytes()); 
    303302                 
    304303                /** 
     
    311310                i = j + 1; 
    312311            } 
     312        } 
     313        output.flush(); 
     314    } 
     315     
     316    /** 
     317     * Sends a string to the server, terminating it with a CRLF. 
     318     * No cleanup is performed, as it is expected that the string 
     319     * is a prepared protocol command. 
     320     */ 
     321    public void sendCommand(String s) throws IOException { 
     322        if (debug) { 
     323            System.out.println("[SEND] " + s); 
     324        } 
     325 
     326        if(s == null) { 
     327            output.write(CRLF, 0, 2); 
     328        } 
     329        else { 
     330            output.write((s+"\r\n").getBytes()); 
    313331        } 
    314332        output.flush();