pos = dn->referee_head;
while ((NULL != pos) && (pos->referrer_id != sid))
{
- sender_id = strdup (GNUNET_i2s (&pos->identity));
+ sender_id = GNUNET_strdup (GNUNET_i2s (&pos->identity));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "I know sender %u %s\n",
pos->referrer_id, sender_id);
GNUNET_free (sender_id);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Testing new advertised hostlist if it is obtainable\n");
current_hostlist = hostlist_to_test;
- return strdup (hostlist_to_test->hostlist_uri);
+ return GNUNET_strdup (hostlist_to_test->hostlist_uri);
}
if ((GNUNET_YES == stat_use_bootstrap) || (linked_list_size == 0))
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using learned hostlist `%s'\n",
pos->hostlist_uri);
current_hostlist = pos;
- return strdup (pos->hostlist_uri);
+ return GNUNET_strdup (pos->hostlist_uri);
}
testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
{
cc = NULL;
- char *p1_c = strdup (GNUNET_i2s (&p1->id));
+ char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id));
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Peers connected: %s <-> %s\n", p1_c,
GNUNET_i2s (&p2->id));
if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
return;
- char * p2_s = strdup(GNUNET_i2s (&p2->id));
+ char * p2_s = GNUNET_strdup(GNUNET_i2s (&p2->id));
GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "transport-testing",
"Asking peers %u (`%s') to connect peer %u (`%s')\n",
p1->no, GNUNET_i2s (&p1->id), p2->no, p2_s);
char *
extract_filename (const char *file)
{
- char *pch = strdup (file);
+ char *pch = GNUNET_strdup (file);
char *backup = pch;
char *filename = NULL;
char *res;
else
filename = pch;
- res = strdup (filename);
+ res = GNUNET_strdup (filename);
GNUNET_free (backup);
return res;
}
struct LogDef n;
memset (&n, 0, sizeof (n));
if (strlen (component) > 0 && component[0] != '*')
- n.component = strdup (component);
+ n.component = GNUNET_strdup (component);
if (strlen (file) > 0 && file[0] != '*')
{
- n.file = strdup (file);
+ n.file = GNUNET_strdup (file);
n.strlen_file = strlen (file);
}
if ( (NULL != function) &&
(strlen (function) > 0) &&
(function[0] != '*') )
- n.function = strdup (function);
+ n.function = GNUNET_strdup (function);
n.from_line = from_line;
n.to_line = to_line;
n.level = level;
tmp = getenv (constname);
if (tmp == NULL)
return 0;
- def = strdup (tmp);
+ def = GNUNET_strdup (tmp);
level = -1;
from_line = 0;
to_line = INT_MAX;
GNUNET_free_non_null (component);
GNUNET_asprintf (&component, "%s-%d", comp, getpid ());
GNUNET_free_non_null (component_nopid);
- component_nopid = strdup (comp);
+ component_nopid = GNUNET_strdup (comp);
env_logfile = getenv ("GNUNET_FORCE_LOGFILE");
if (env_logfile != NULL)
path = _dyld_get_image_name (i);
if (path != NULL && strlen (path) > 0)
{
- p = strdup (path);
+ p = GNUNET_strdup (path);
s = p + strlen (p);
while ((s > p) && (*s != '/'))
s--;