added ippool.h and ippool.c
diff --git a/gtp/queue.c b/gtp/queue.c
index 0080e43..900f240 100644
--- a/gtp/queue.c
+++ b/gtp/queue.c
@@ -133,7 +133,8 @@
(*qmsg)->this = queue->next;
(*qmsg)->next=-1; /* End of the queue */
(*qmsg)->prev=queue->last; /* Link to the previous */
- queue->qmsga[queue->last].next=queue->next; /* Link previous to us */
+ if (queue->last != -1)
+ queue->qmsga[queue->last].next=queue->next; /* Link previous to us */
queue->last = queue->next; /* End of queue */
if (queue->first == -1) queue->first = queue->next;
queue->next = (queue->next+1) % QUEUE_SIZE; /* Increment */