Navigation


Changeset 1103:d8591b1c56cd in freeDiameter for libfdproto/fifo.c


Ignore:
Timestamp:
May 10, 2013, 7:48:57 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Implemented a few hooks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdproto/fifo.c

    r1093 r1103  
    412412        CHECK_MALLOC_DO(  new = malloc (sizeof (struct fifo_item)) , {
    413413                        pthread_mutex_unlock( &queue->mtx );
     414                        return ENOMEM;
    414415                } );
    415416       
     
    470471        ASSERT( ! FD_IS_LIST_EMPTY(&queue->list) );
    471472       
    472         fi = (struct fifo_item *)queue->list.next;
     473        fi = (struct fifo_item *)(queue->list.next);
     474        ret = fi->item.o;
    473475        fd_list_unlink(&fi->item);
    474476        queue->count--;
    475477        queue->total_items++;
    476         ret = fi->item.o;
    477478       
    478479        /* Update the timings */
     
    598599                return EPIPE;
    599600        }
    600                
     601       
    601602        if (queue->count > 0) {
    602603                /* There are items in the queue, so pick the first one */
Note: See TracChangeset for help on using the changeset viewer.