From c0ffee7b80e5571a86e9d8f399cf7c65e0ca3b53 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com> Date: Wed, 19 Sep 2007 16:46:24 -0400 Subject: [PATCH] CallID generated --- sflphone-gtk/src/actions.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sflphone-gtk/src/actions.c b/sflphone-gtk/src/actions.c index d5f762bdf5..62268d2742 100644 --- a/sflphone-gtk/src/actions.c +++ b/sflphone-gtk/src/actions.c @@ -19,6 +19,8 @@ #include <gtk/gtk.h> #include <string.h> +#include <glib/gprintf.h> +#include <stdlib.h> #include <actions.h> #include <mainwindow.h> @@ -282,7 +284,10 @@ sflphone_keypad( guint keyval, gchar * key) call_t * c = g_new0 (call_t, 1); c->state = CALL_STATE_DIALING; c->from = g_strconcat("\"\" <", key, ">", NULL); - c->callID = "asdf"; // TODO generate a unique number + + c->callID = g_new0(gchar, 100); + g_sprintf(c->callID, "%d", rand()); + c->to = g_strdup(key); call_list_add(c); screen_set_call(c); -- GitLab