Changeset 2522

Show
Ignore:
Timestamp:
09/11/07 13:21:52 (1 year ago)
Author:
gcobb
Message:

gpesyncd: fix error in command processing for local and ssh access

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/gpe/ChangeLog

    r2516 r2522  
     12007-09-11  Graham Cobb  <g+770@cobb.uk.net> 
     2 
     3        * src/gpesync_client.c (gpesync_client_open_ssh, gpesync_client_open_local):  
     4        Fix off-by-one error in argument list creation. 
     5 
     6        * ChangeLog: add ChangeLog entry (below) for last night's changes (it was late!) 
     7 
     82007-09-10  Graham Cobb  <g+770@cobb.uk.net> 
     9 
     10        * src/gpe-sync: new config file format 
     11 
     12        * src/gpe_xml.c (gpe_parse_settings): parse new config file format 
     13 
     14        * src/gpe_sync.h: add command and use_remote to environment 
     15 
     16        * src/gpe_sync.c (gpe_connect): specify command for conection 
     17 
     18        * src/gpesync_client.c (gpesync_client_open_ssh, gpesync_client_open_local),  
     19        src/gpesync_client.h :  Allow command to be specified by caller 
     20 
    1212007-09-03  Graham Cobb  <g+opensync@cobb.uk.net> 
    222 
  • plugins/gpe/src/gpesync_client.c

    r2521 r2522  
    267267    /* Look for the next space */ 
    268268    p = strchr(p, ' '); 
    269     if (!p) break; 
    270     p[0]=0; // Null terminate argument 
    271     while (*++p==' ') ; // Skip blanks 
     269    if (p) { 
     270      p[0]=0; // Null terminate argument 
     271      while (*++p==' ') ; // Skip blanks 
     272    } 
    272273  } 
    273274  argv[i] = NULL; 
     
    327328    /* Look for the next space */ 
    328329    p = strchr(p, ' '); 
    329     if (!p) {i++; break;} 
    330     p[0]=0; // Null terminate argument 
    331     while (*++p==' ') ; // Skip blanks 
     330    if (p) {  
     331      p[0]=0; // Null terminate argument 
     332      while (*++p==' ') ; // Skip blanks 
     333    } 
    332334  } 
    333335  argv[i] = NULL;