Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • aim.c

    re4524da r2770be99  
    18121812  GPollFD *fd;
    18131813  int i;
    1814   if (len < event_source->fds->len)
     1814  if (len < event_source->fds->len) {
    18151815    owl_function_debugmsg("Truncating AIM PollFDs to %d, was %d", len, event_source->fds->len);
    1816   for (i = len; i < event_source->fds->len; i++) {
    1817     fd = event_source->fds->pdata[i];
    1818     g_source_remove_poll(&event_source->source, fd);
    1819     g_free(fd);
    1820   }
    1821   g_ptr_array_remove_range(event_source->fds, len, event_source->fds->len - len);
     1816    for (i = len; i < event_source->fds->len; i++) {
     1817      fd = event_source->fds->pdata[i];
     1818      g_source_remove_poll(&event_source->source, fd);
     1819      g_free(fd);
     1820    }
     1821    g_ptr_array_remove_range(event_source->fds, len, event_source->fds->len - len);
     1822  }
    18221823}
    18231824
     
    18901891{
    18911892  owl_aim_event_source *event_source = (owl_aim_event_source*)source;
    1892   truncate_pollfd_list(event_source, 0);
    1893   g_ptr_array_free(event_source->fds, TRUE);
     1893  /* Don't remove the GPollFDs. We are being finalized, so they'll be removed
     1894   * for us. Moreover, glib will fire asserts if g_source_remove_poll is called
     1895   * on a source which has been destroyed (which occurs when g_source_remove is
     1896   * called on it). */
     1897  owl_ptr_array_free(event_source->fds, g_free);
    18941898}
    18951899
Note: See TracChangeset for help on using the changeset viewer.