Changeset 691

Show
Ignore:
Timestamp:
10/22/06 10:38:23 (2 years ago)
Author:
jajcus
Message:

- long message splitting hopefully fixed (previous version of the function just could not work)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/sessions.c

    r690 r691  
    10391039int i; 
    10401040 
    1041         m=*msg; 
    1042         if (strlen(*msg)<=2000){ 
    1043                 *msg=NULL; 
     1041        m = *msg; 
     1042        if (strlen(*msg) <= 1989){ 
     1043                *msg = NULL; 
    10441044                return g_strdup(m); 
    10451045        } 
    1046         for(i=2000;i>1000;i++){ 
     1046        for(i=1988; i >= 1000; i--){ 
    10471047                if (isspace(m[i])){ 
    1048                         *msg=m+i+1; 
    1049                         return g_strndup(m,i); 
    1050                 } 
    1051         } 
    1052         *msg=m+i; 
    1053         return g_strndup(m,i); 
     1048                        *msg = m + i + 1; 
     1049                        return g_strndup(m, i); 
     1050                } 
     1051        } 
     1052        *msg = m + i; 
     1053        return g_strndup(m, i); 
    10541054} 
    10551055