Changeset 475

Show
Ignore:
Timestamp:
04/04/00 13:02:45 (14 years ago)
Author:
ucacoxh
Message:

- Make waiting_ack->next null when putting message on ack list, otherwise

flush messages can attempt to delete the same message twice.

Location:
common/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • common/trunk/MODS

    r474 r475  
    229229        * 28 January 2000 
    230230 
    231 v1.1.1  - Add extra debugging code 
     231v1.1.1  - Add extra debugging code 
    232232        * 1 February 2000 
    233233 
    234 v1.1.2  - Add routines for handling NTP format timestamps, in ntp.[ch] 
     234v1.1.2  - Add routines for handling NTP format timestamps, in ntp.[ch] 
    235235        - Add udp_addr_valid. 
    236         - Fix cname setup for Win32. 
     236        - Fix cname setup for Win32. 
    237237        - Add udp_init_if() call, to open a UDP/IP socket bound to a 
    238238          specific interface 
     
    244244        * 14 February 2000 
    245245 
    246 v1.1.3  - Fix debug_set_core_dir() when not debugging. 
     246v1.1.3  - Fix debug_set_core_dir() when not debugging. 
    247247        * 14 February 2000 
    248248 
    249 v1.1.4  - Add tests for mbus_parser.c/mbus_addr.c and fix bugs found 
     249v1.1.4  - Add tests for mbus_parser.c/mbus_addr.c and fix bugs found 
    250250        - Fix use of free()'d memory in mbus.c 
    251251        * 24 February 2000 
    252252 
    253 v1.1.5  - Remove SunOS and Solaris defines from the configure script, they 
     253v1.1.5  - Remove SunOS and Solaris defines from the configure script, they 
    254254          shouldn't be necessary any longer. 
    255255        - Add workaround for missing getaddrinfo() on some platforms. 
     
    259259        - Change RTP event type #defines into rtp_event_type so compiler can 
    260260          check all cases are covered in decision blocks. 
     261        - Fix waiting_ack next is set to null when message is put on ack list. 
    261262 
    262263Still to do... 
  • common/trunk/src/mbus.c

    r474 r475  
    496496} 
    497497 
    498 static void mbus_flush_msgs(struct mbus_msg *queue) 
     498static void mbus_flush_msgs(struct mbus_msg **queue) 
    499499{ 
    500500        struct mbus_msg *curr, *next; 
    501501        int i; 
    502  
    503         curr = queue; 
     502         
     503        curr = *queue; 
    504504        while(curr) { 
    505505                next = curr->next; 
     
    509509                        xfree(curr->arg_list[i]); 
    510510                } 
     511                xfree(curr); 
    511512                curr = next; 
    512513        } 
     514        *queue = NULL; 
    513515} 
    514516 
     
    525527        /* FIXME: It should be a fatal error to call mbus_exit() if some messages are still outstanding. */ 
    526528        /*        We will need an mbus_flush() call first though, to ensure nothing is waiting.          */ 
    527         mbus_flush_msgs(m->cmd_queue); 
    528         mbus_flush_msgs(m->waiting_ack); 
     529        mbus_flush_msgs(&m->cmd_queue); 
     530        mbus_flush_msgs(&m->waiting_ack); 
    529531 
    530532        if (m->encrkey != NULL) { 
     
    602604                        gettimeofday(&(curr->send_time), NULL); 
    603605                        m->waiting_ack = curr; 
     606                        curr->next = NULL; 
    604607                        return; 
    605608                } else {