Changeset a5b5d00


Ignore:
Timestamp:
Mar 24, 2011, 4:42:22 PM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
3f52e14
Parents:
e5da3fe
git-author:
David Benjamin <davidben@mit.edu> (03/11/11 18:12:10)
git-committer:
David Benjamin <davidben@mit.edu> (03/24/11 16:42:22)
Message:
In duplicated outgoing zephyrs only reply on the relevant recipient

Fixes the other half of bug #63.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • message.c

    re5da3fe ra5b5d00  
    980980  /* Although not strictly the zwriteline, anyone using the unsantized version
    981981   * of it probably has a bug. */
    982   replyline = owl_zwrite_get_replyline(z);
     982  replyline = owl_zwrite_get_replyline(z, recip_index);
    983983  owl_message_set_zwriteline(m, replyline);
    984984  g_free(replyline);
  • zwrite.c

    re56303f ra5b5d00  
    382382 * message field is stripped out. Result should be freed with
    383383 * g_free.
     384 *
     385 * If not a CC, only the recip_index'th user will be replied to.
    384386 */
    385 char *owl_zwrite_get_replyline(const owl_zwrite *z)
     387char *owl_zwrite_get_replyline(const owl_zwrite *z, int recip_index)
    386388{
    387389  /* Match ordering in zwrite help. */
     
    415417    owl_string_append_quoted_arg(buf, z->opcode);
    416418  }
    417   for (i = 0; i < owl_list_get_size(&(z->recips)); i++) {
     419  if (z->cc) {
     420    for (i = 0; i < owl_list_get_size(&(z->recips)); i++) {
     421      g_string_append_c(buf, ' ');
     422      owl_string_append_quoted_arg(buf, owl_list_get_element(&(z->recips), i));
     423    }
     424  } else if (recip_index < owl_list_get_size(&(z->recips))) {
    418425    g_string_append_c(buf, ' ');
    419     owl_string_append_quoted_arg(buf, owl_list_get_element(&(z->recips), i));
     426    owl_string_append_quoted_arg(buf, owl_list_get_element(&(z->recips), recip_index));
    420427  }
    421428
Note: See TracChangeset for help on using the changeset viewer.