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
|
Roger Mundt
|
||||||
* troubleshooting and debugging help
|
* troubleshooting and debugging help
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -159,6 +159,7 @@ DAAP_BLOCK *daap_get_new(void) {
|
||||||
pnew->value=NULL;
|
pnew->value=NULL;
|
||||||
pnew->parent=NULL;
|
pnew->parent=NULL;
|
||||||
pnew->children=NULL;
|
pnew->children=NULL;
|
||||||
|
pnew->last_child=NULL;
|
||||||
pnew->next=NULL;
|
pnew->next=NULL;
|
||||||
|
|
||||||
return pnew;
|
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 */
|
/* walk the child list and put it at the end */
|
||||||
if(parent) {
|
if(parent) {
|
||||||
current=last=parent->children;
|
last = parent->last_child;
|
||||||
while(current) {
|
if (last) {
|
||||||
last=current;
|
last->next = pnew;
|
||||||
current=current->next;
|
} else {
|
||||||
}
|
parent->children = pnew;
|
||||||
|
}
|
||||||
if(last) { /* some there already */
|
parent->last_child = pnew;
|
||||||
last->next=pnew;
|
|
||||||
} else {
|
|
||||||
parent->children=pnew;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* now, walk the chain and update sizes */
|
/* 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 */
|
char svalue[4]; /* for statics up to 4 bytes */
|
||||||
struct daap_block_tag *parent;
|
struct daap_block_tag *parent;
|
||||||
struct daap_block_tag *children;
|
struct daap_block_tag *children;
|
||||||
|
struct daap_block_tag *last_child;
|
||||||
struct daap_block_tag *next;
|
struct daap_block_tag *next;
|
||||||
} DAAP_BLOCK;
|
} DAAP_BLOCK;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue