[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r760 - Extractor/src/main
From: |
heiko |
Subject: |
[GNUnet-SVN] r760 - Extractor/src/main |
Date: |
Sat, 7 May 2005 12:25:08 -0700 (PDT) |
Author: heiko
Date: 2005-05-07 12:25:04 -0700 (Sat, 07 May 2005)
New Revision: 760
Modified:
Extractor/src/main/extractor.c
Log:
Options set to be NULL when no () specified in string passed to
loadConfigLibraries() in extractor.c.
Modified: Extractor/src/main/extractor.c
===================================================================
--- Extractor/src/main/extractor.c 2005-05-07 18:40:15 UTC (rev 759)
+++ Extractor/src/main/extractor.c 2005-05-07 19:25:04 UTC (rev 760)
@@ -398,7 +398,10 @@
result->libraryHandle = handle;
result->extractMethod = method;
result->libname = strdup (library);
- result->options = strdup (options);
+ if( options )
+ result->options = strdup (options);
+ else
+ result->options = NULL;
return result;
}
@@ -432,7 +435,10 @@
result->libraryHandle = handle;
result->extractMethod = method;
result->libname = strdup (library);
- result->options = strdup (options);
+ if( options )
+ result->options = strdup (options);
+ else
+ result->options = NULL;
if (prev == NULL)
return result;
pos = prev;
@@ -506,16 +512,23 @@
cpy[pos++] = '\0'; /* end of string. */
}
} else {
- lastconf = pos; /* start config from here = "". */
+ lastconf = -1; /* NULL config when no (). */
cpy[pos++] = '\0'; /* replace ':' by termination */
}
if (cpy[last] == '-')
{
last++;
- prev = EXTRACTOR_addLibraryLast2 (prev, &cpy[last], &cpy[lastconf]);
+ if( lastconf != -1 )
+ prev = EXTRACTOR_addLibraryLast2 (prev, &cpy[last],
+ &cpy[lastconf]);
+ else
+ prev = EXTRACTOR_addLibraryLast2 (prev, &cpy[last], NULL);
}
else
- prev = EXTRACTOR_addLibrary2 (prev, &cpy[last], &cpy[lastconf]);
+ if( lastconf != -1 )
+ prev = EXTRACTOR_addLibrary2 (prev, &cpy[last], &cpy[lastconf]);
+ else
+ prev = EXTRACTOR_addLibrary2 (prev, &cpy[last], NULL);
last = pos;
}
@@ -551,7 +564,8 @@
prev->next = pos->next;
/* found */
free (pos->libname);
- free (pos->options);
+ if( pos->options )
+ free (pos->options);
if( pos->libraryHandle )
lt_dlclose (pos->libraryHandle);
free (pos);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r760 - Extractor/src/main,
heiko <=