You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
/**
* Identifier of #refresh_hello_task().
*/
-static struct GNUNET_SCHEDULER_Task * hello_task;
+static struct GNUNET_SCHEDULER_Task *hello_task;
/**
&address_generator,
&gc,
friend_option);
- GNUNET_assert (NULL != our_hello);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Refreshed my %s HELLO, new size is %d\n",
(GNUNET_YES == friend_option) ? "friend-only" : "public",
/**
- * Schedule task to refresh hello (unless such a
- * task exists already).
+ * Schedule task to refresh hello (but only if such a
+ * task exists already, as otherwise the module might
+ * have been shutdown).
*/
static void
refresh_hello ()
{
if (NULL != hello_task)
+ {
GNUNET_SCHEDULER_cancel (hello_task);
- hello_task = GNUNET_SCHEDULER_add_now (&refresh_hello_task,
- NULL);
+ hello_task = GNUNET_SCHEDULER_add_now (&refresh_hello_task,
+ NULL);
+ }
}
hello_cb = cb;
hello_cb_cls = cb_cls;
friend_option = friend_only;
- refresh_hello ();
+ refresh_hello_task (NULL, NULL);
}