#include "oak.h"
#include <stdlib.h>

oak_queue *queuelist_get_queue_by_name(oak_queuelist *ql, char *name) {
  /* return the queue in the ql with name "name".  if it doesn't exist
     return NULL */
  int i, j;

  j=oak_list_get_size(ql);
  for (i=0; i<j; i++) {
    if (!strcmp(name, queue_get_name(oak_list_get_element(ql, i)))) {
      return(oak_list_get_element(ql, i));
    }
  }
  return(NULL);
}
