* keyserver.c (keyserver_spawn): Remove whitespace after keyserver
authorDavid Shaw <dshaw@jabberwocky.com>
Thu, 12 Sep 2002 12:10:04 +0000 (12:10 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Thu, 12 Sep 2002 12:10:04 +0000 (12:10 +0000)
commands.

g10/ChangeLog
g10/keyserver.c

index a180dfc..001c555 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-12  David Shaw  <dshaw@jabberwocky.com>
+
+       * keyserver.c (keyserver_spawn): Remove whitespace after keyserver
+       commands.
+
 2002-09-10  David Shaw  <dshaw@jabberwocky.com>
 
        * exec.c (expand_args): Remove loop left over from earlier
index 1afe1e7..eff486b 100644 (file)
@@ -543,6 +543,7 @@ keyserver_spawn(int action,STRLIST list,
   for(;;)
     {
       char *ptr;
+      int plen;
 
       if(iobuf_read_line(spawn->fromchild,&line,&buflen,&maxlen)==0)
        {
@@ -552,11 +553,11 @@ keyserver_spawn(int action,STRLIST list,
 
       ptr=line;
 
-      if(*ptr=='\r')
-       ptr++;
-
-      if(*ptr=='\n')
-       ptr++;
+      /* remove trailing whitespace */
+      plen=strlen(ptr);
+      while(plen>0 && isspace(ptr[plen-1]))
+       plen--;
+      plen[ptr]='\0';
 
       if(*ptr=='\0')
        break;