OpenCores
URL https://opencores.org/ocsvn/mlite/mlite/trunk

Subversion Repositories mlite

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 323 to Rev 324
    Reverse comparison

Rev 323 → Rev 324

/trunk/kernel/netutil.c
505,6 → 505,8
}
else
{
if(buf[j] == 0)
buf[j] = '\n'; //Linux support
if(length < COMMAND_BUFFER_SIZE-4 || (length <
COMMAND_BUFFER_SIZE-2 && (buf[j] == '\r' || buf[j] == '\n')))
{
933,6 → 935,38
socket->userFunc = socket->funcPtr;
info.startPtr(socket, argv);
}
 
 
typedef struct NameValue_t {
struct NameValue_t *next;
void *value;
char name[1];
} NameValue_t;
 
//Find the value associated with the name
void *IPNameValue(const char *name, void *value)
{
static NameValue_t *head;
NameValue_t *node;
for(node = head; node; node = node->next)
{
if(strcmp(node->name, name) == 0)
break;
}
if(node == NULL)
{
node = (NameValue_t*)malloc(sizeof(NameValue_t) + (int)strlen(name));
if(node == NULL)
return NULL;
strcpy(node->name, name);
node->value = value;
node->next = head;
head = node;
}
if(value)
node->value = value;
return node->value;
}
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.