Patches for slow connect speed from dirkthedaring2
This commit is contained in:
parent
07e0490120
commit
5555707a6d
1
CREDITS
1
CREDITS
|
@ -65,4 +65,3 @@ Ciamac Moallemi
|
|||
Roger Mundt
|
||||
* troubleshooting and debugging help
|
||||
|
||||
|
||||
|
|
|
@ -159,6 +159,7 @@ DAAP_BLOCK *daap_get_new(void) {
|
|||
pnew->value=NULL;
|
||||
pnew->parent=NULL;
|
||||
pnew->children=NULL;
|
||||
pnew->last_child=NULL;
|
||||
pnew->next=NULL;
|
||||
|
||||
return pnew;
|
||||
|
@ -198,17 +199,13 @@ DAAP_BLOCK *daap_add_formatted(DAAP_BLOCK *parent, char *tag,
|
|||
|
||||
/* walk the child list and put it at the end */
|
||||
if(parent) {
|
||||
current=last=parent->children;
|
||||
while(current) {
|
||||
last=current;
|
||||
current=current->next;
|
||||
}
|
||||
|
||||
if(last) { /* some there already */
|
||||
last->next=pnew;
|
||||
} else {
|
||||
parent->children=pnew;
|
||||
}
|
||||
last = parent->last_child;
|
||||
if (last) {
|
||||
last->next = pnew;
|
||||
} else {
|
||||
parent->children = pnew;
|
||||
}
|
||||
parent->last_child = pnew;
|
||||
}
|
||||
|
||||
/* now, walk the chain and update sizes */
|
||||
|
|
|
@ -51,6 +51,7 @@ typedef struct daap_block_tag {
|
|||
char svalue[4]; /* for statics up to 4 bytes */
|
||||
struct daap_block_tag *parent;
|
||||
struct daap_block_tag *children;
|
||||
struct daap_block_tag *last_child;
|
||||
struct daap_block_tag *next;
|
||||
} DAAP_BLOCK;
|
||||
|
||||
|
|
Loading…
Reference in New Issue